2006/5/19, John Taylor-Johnston <John.Taylor-Johnston@xxxxxxxxxxxxxxxxxxxxx
: Any idea why this bit of code if("yes" == $_POST['submitter']) { mysql_select_db($db,$myconnection); $sql = "INSERT INTO `$db`.`$table` (name,email,comments,entrydate) values ('$name','$email','$comments','$entrydate')"; mysql_query($sql) or die(print mysql_error()); } is provoking this message in my Apache error log? [Fri May 19 19:05:10 2006] [error] PHP Notice: Undefined index: submitter in /home/jtjohnston/domains/jtjohnston.ca/public_html/comments.php on line 29 John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Try using: if(isset($_POST['submitter']) && "yes" == $_POST['submitter'])