Re: [PHP-DB] Need help with HTML form errors

Kesavan Rengarajan <[email protected]>
Newsgroups gmane.comp.php.windows,gmane.comp.php.database
Message-ID <[email protected]>
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 <[email protected]>  
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 Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.