Re: Need help with HTML form errors

From: Date: Sun, 04 Jul 2010 08:54:22 +0000
Subject: Re: Need help with HTML form errors
References: 1  Groups: php.db php.windows 
Request: Send a blank email to php-db+get-47245@lists.php.net to get a copy of this message
Hi, Those are notices not warnings(meaning they can be ignored sometimes, search for error_reporting in the PHP manual). In your example, if you do not wish ignore the notices, then initialize the different variables to some value. Sent from my iPhone On 04/07/2010, at 6:30 PM, nagendra prasad <nagendra802000@gmail.com> wrote:
Hi All, I have this php form that I have inserted in the result page. ************************************************************************************************ <form action="index.php" method="post"> <table class="bd" border="0" cellspacing="1" cellpadding="4"> <tr> <td><b></b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td> <td><input type="text" name="filter" value="<?php echo $filter ?>"></td> <td><input type="submit" name="action" value="Search"></td> <td><select name="filter_field" style="width:100px;"> <option value="">All Fields</option> <option value="<?php echo "Type" ?>"<?php if ($filterfield == "type") { echo "selected"; } ?>><?php echo htmlspecialchars("Type") ?></option> <option value="<?php echo "Name" ?>"<?php if ($filterfield == "name") { echo "selected"; } ?>><?php echo htmlspecialchars("Name") ?></option> <option value="<?php echo "Date" ?>"<?php if ($filterfield == "date") { echo "selected"; } ?>><?php echo htmlspecialchars("Date") ?></option> <option value="<?php echo "Size" ?>"<?php if ($filterfield == "size") { echo "selected"; } ?>><?php echo htmlspecialchars("Size") ?></option> </select></td> </tr> </table> <hr size="1" noshade> *************************************************************************** The above code is giving me the following errors: <br /> <b>Notice</b>: Undefined variable: filter in <b>C:\wamp\www\5_Final\index.php</b> on line <b>228</b><br /> Notice: Undifined Variable: filterfield in c:\wamp\www\5_final\index.php on line 233 > Type Notice: Undifined Variable: filterfield in c:\wamp\www\5_final\index.php on line 234 > Name Notice: Undifined Variable: filterfield in c:\wamp\www\5_final\index.php on line 235 > Date Notice: Undifined Variable: filterfield in c:\wamp\www\5_final\index.php on line 236 > Size *Please help me with these errors.*


« previous php.db (#47245) next »