|
Posted by Alvaro G. Vicario on 09/29/49 11:33
*** John Oliver escribió/wrote (01 Dec 2005 21:05:38 GMT):
> [client 127.0.0.1] PHP Notice: Undefined index: name in
> /home/www/reformcagunlaws.com/new.php on line 6
> $name=$_POST['name'];
A notice is not an error. You've just configured PHP to warn you when you
use an non initialized variable. Try:
$name = isset($_POST['name']) ? $_POST['name'] : NULL;
> $query = "INSERT INTO petitions VALUES
> ('','$name','$address','city','county','zip','$phone','$email','$volunteer','contacted','deliverd')";
> mysql_query($query);
Read some documentation about SQL-Injection.
--
-+ Álvaro G. Vicario - Burgos, Spain
++ http://bits.demogracia.com es mi sitio para programadores web
+- http://www.demogracia.com es mi web de humor libre de cloro
--
[Back to original message]
|