Ver Mensaje Individual
  #12 (permalink)  
Antiguo 09/04/2012, 18:47
Avatar de elarrieux
elarrieux
 
Fecha de Ingreso: abril-2012
Ubicación: Uruguay
Mensajes: 67
Antigüedad: 12 años, 1 mes
Puntos: 26
Respuesta: Problema al procesar string

Probalo asi, a mi me funciono:

Index.html

Código PHP:
<!DOCTYPE html>
 
<
html lang="es">
    <
head>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
        <
script src="http://code.jquery.com/jquery-1.7.2.min.js" type="text/javascript"></script>
        <script type="text/javascript" src="acciones.js"></script>
    </head>
 
    <body style="text-align: center;">
        <div style="text-align: left; width: 500px; margin: 0 auto;">
            <form action="" method="post" name="postedit">
                <div style="float:left; color:#0D7200; font-weight: bold; margin-bottom:3px;">
                    <div style="display:inline-block; margin-left:5px;">
                        Categoria:
                    </div>
                    <div style="display:inline-block; margin-left:5px;">
                        <input id="EditCategoria" class="inputPublicar" style="height: 20px; margin-left: -5px;" type="text" maxlength="25" value="Música">
                    </div>
                </div>
                <div id="focusEditar">
                    <input class="login" type="submit" style="float:right;" name="postEdit" id="postEdit" value="Guardar" onclick="return Guardar(this.form.EditCategoria.value);" tabindex="2">
                </div>
            </form>
        </div>
    </body>
</html> 
acciones.js

Sin cambios

guardar.php

Código PHP:
<?php
 
        $categoria 
$_POST['categoria'];
        
//Limpiar 
        //$categoria = preg_replace("/[^a-z ñáéíóú]/i", "", $categoria); 
        
        
echo $categoria." *";
?>
Sds.