Re: i got a problem

From: Date: Wed, 05 Mar 2003 15:16:21 +0000
Subject: Re: i got a problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-138282@lists.php.net to get a copy of this message
Try $result = mysql_query($sql) or die(mysql_error()); to see what the problem is. ---John Holmes... ----- Original Message ----- From: "Luis A" <webmaster@iscf.esisc.colombus.cu> To: <php-general@lists.php.net> Sent: Tuesday, March 04, 2003 9:29 PM Subject: [PHP] i got a problem hi every one here o got one problem here on the php take a look at this <html> <body> <form method="post" action="add_reg.php3"> Nombre :<input type="Text" name="nombre"><br> Teléfono:<input type="Text" name="telefono"><br> E-Mail:<input type="Text" name="email"><br> Pais :<input type="Text" name="pais"><br> Comentario: <TEXTAREA NAME="comentario" ROWS="10" COLS="25">escriba aqui su el comentario que desee añadir</TEXTAREA><br> <input type="Submit" name="enviar" value="Aceptar información"> </form> </body> </html> <html> <body> <?php // process form $db = mysql_connect("localhost", "root"); mysql_select_db("mydb",$db); $sql = "INSERT INTO agenda (nombre, direccion, telefono, email, pais, comentario) \n VALUES ('$nombre', '$direccion', '$telefono', '$email', '$pais', '$comentario')"; $result = mysql_query($sql); echo "¡thanks! we have received your data.\n"; ?> aparently php create the table on the mysql server (he make the connect to the mysql server) , but he does insert the data from form on the mysql database any subjestion?? i realy if ani one of yours please can help me

« previous php.general (#138282) next »