Ver Mensaje Individual
  #4 (permalink)  
Antiguo 09/04/2008, 08:00
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Re: Donde está el error al recibir los datos con AJAX?

Prueba hacerlo así:
Código PHP:
<?php
session_start
();
header"Content-type: text/plain" ); // agregue esta línea
include ("../../conn.inc.php");
$nuevo$_POST['nuevo'];
if(
trim($nuevo)!=''){
$consulta"SELECT * FROM nombres WHERE titulo= '".$nuevo."';";
$resultadomysql_query($consulta,$con) or die(mysql_error());
if(
mysql_num_rows($resultado)!= 0)
echo 
"ok";
else
echo 
"mal";
} else {
     echo 
"no se envio un valor"// también esto para que revises con un alert la respuesta
}
?>
Saludos.