Ver Mensaje Individual
  #9 (permalink)  
Antiguo 03/04/2003, 15:38
rashid
 
Fecha de Ingreso: enero-2002
Ubicación: Perez Zeledon Costa Rica
Mensajes: 1.009
Antigüedad: 22 años, 4 meses
Puntos: 11
Por si alguien busca la respuesta, aqui estaba la solucion:
$title2= htmlspecialchars($title);

$sql =mysql_query("SELECT * FROM Comercials WHERE cTitle='$title2'")
or die(mysql_error());

if ($sql){
$cant =mysql_num_rows($sql);
}
// echo "title2 ",$title2,"<br>";
//echo "title ",$title,"<br>";
//echo "sql ",$sql,"<br>";


if($cant >0){
echo "that Comercial Name: <B>".$title."</B> is already taken -go back and chose another one.";
}else{
insert aqui
}