Need help with HTML form errors

--001485e0b496aeaf45048a8ba27d
Content-Type: text/plain; charset=ISO-8859-1

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>              </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:


<b>Notice</b>: Undefined variable: filter in
<b>C:\wamp\www\5_Final\index.php</b> on line <b>228</b>


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

--001485e0b496aeaf45048a8ba27d--
Nagendra Prasad [ So, 04 Juli 2010 10:30 ] [ ID #2044005 ]
PHP » gmane.comp.php.windows » Need help with HTML form errors

Vorheriges Thema: Image linking help in PHP
Nächstes Thema: Need Help in Mysql database