Ver Mensaje Individual
  #6 (permalink)  
Antiguo 08/07/2007, 07:19
Avatar de david_M_G
david_M_G
 
Fecha de Ingreso: febrero-2005
Mensajes: 938
Antigüedad: 19 años, 3 meses
Puntos: 20
Re: Mi no comprende

Prueba asi

Código PHP:
<?php 
 
include("conectarse.php");
 
 if (isset(
$_POST['Submit'])) {

 
$nick $_POST['nick'];
 
$titulo $_POST['titulo'];
 
$chiste $_POST['chiste'];

   
//if (strlen($nick)>8 && 4>strlen($nick)) {echo "El nick debe tener como maximo 8 caracteres y como minimo 4"; break;}
   //if (strlen($titulo)<9 && 19<strlen($titulo)){echo "El titulo debe tener como minimo 10 caracteres y como maximo 20"; break;}
   //if (strlen($chiste) && strlen($chiste)){echo "El titulo debe tener como minimo y como maximo"; break;}
   
conectarse();
   
$sql="INSERT INTO chistes_sinrevisar (nick,titulo,chiste) VALUES ".$nick.",".$titulo.",".$chiste;
   
$consulta=mysql_query($sql);
   
//echo ("Chiste enviado con exito<br><a href=ver_chiste.php>Volver</a>");
  
}
 else
  {
   echo 
"<form name=form1 method='post'><p>";
   echo 
"<input type=text name=nick value=Nick...></p><p>";
   echo 
"<input type=text name=titulo value=Titulo...></p><p>";
   echo 
"<textarea name=chiste cols=50 rows=10>Chiste ...</textarea></p></form>";
   echo 
"<p><input type=submit name='Submit' value=Enviar></p>";
  } 


?>