Does anyone know why my Apache logs might be filling up with errors like these: [client 62.232.224.52] PHP Notice: Undefined index: PATH_INFO in /var/www/html/fortliberty.org/ad_network_360.php on line 76, referer: http://www.google.co.uk/search?q=how+to+build+a+9mm&btnG=Search&hl=en [client 62.232.224.52] PHP Notice: Undefined index: HTTPS in /var/www/html/fortliberty.org/ad_network_360.php on line 95, referer: http://www.google.co.uk/search?q=how+to+build+a+9mm&btnG=Search&hl=en Code (markup):
Sounds like you have over zealous error reporting setup for PHP by default. Add this to the beginning of the ad network file: error_reporting(E_ALL & ~E_NOTICE); PHP:
Thanks Shawn! This is the default setup under RedHat Enterprise Linux now. I chose to edit /etc/php.ini instead.
Hi Shawn, Thanks, this code suppresses the error report. But still the data is going to the database whenever I open the page. What I want is to have the form on a page and when I submit the data, I should remain on the same page. I don't need another page (like thanks page etc). Below is my form- **** <body> <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("club_db", $con); mysql_query("INSERT INTO `club_db`.`club_master` ( `cb_no` , `cb_name` , `chrtered_on` ) VALUES('$_POST[cb_no]','$_POST[cb_name]','$_POST[chrtered_on]')"); ?> <div class="cont"> <div><img src="images/top.jpg" width="970" /></div> <div id="nav"> <?php include("nav.php"); ?> </div> <div align="center"> <fieldset style="width:300px;"> <legend style="margin-top:30px; color:#7A7A7A;"><h4 style="margin-bottom:1px;">Club Master</h4></legend> <form action="" method="post" name="club_master" id="club_master"> <table width="270" border="0"> <tr> <td align="left">Club No:</td> <td><input type="text" name="cb_no" id="cb_no" tabindex="1" /></td> </tr> <tr> <td align="left">Club Name: </td> <td><input type="text" name="cb_name" id="cb_name" tabindex="2" /></td> </tr> <tr> <td align="left">Chartered On:</td> <td><input type="text" name="chrtered_on" id="chrtered_on" tabindex="3" /></td> </tr> <tr> <td colspan="2" align="center"><input name="Submit" type="submit" id="Submit" tabindex="4" onClick="MM_validateForm('cb_no','','R','cb_name','','R');return document.MM_returnValue" value="Submit" /></td> </tr> </table> <?php mysql_close($con) ?> </form>