Re: Need help with HTML form errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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.*

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux