Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

php form problem

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

php form problem

Postby jacquesy » Sat Jan 25, 2003 6:06 am

I'm using a php page to display values on a database.

The form action is itself (php_self). It's working ok except for when the page is first viewed the error message:

PHP Notice: Undefined index: manufacturer.....

I think this is because the manufacturer doesn't have a value until the form is submitted.

I'm using:

$manufacturer = $_REQUEST["manufacturer"];

This problem only occurs on my localhost, please help!
jacquesy
New php-forum User
New php-forum User
 
Posts: 12
Joined: Tue Jan 21, 2003 2:27 pm

Postby Papillon » Sat Jan 25, 2003 7:52 am

Code: Select all
if (!isset($manufacturer)) { $manufacturer = blablabla }


add that at the top maybe? of course you can set the manufacturer to anything, set it to empty or whatever :)
Papillon
New php-forum User
New php-forum User
 
Posts: 4
Joined: Tue Jan 21, 2003 2:46 pm


Return to PHP coding => General

Who is online

Users browsing this forum: Bing [Bot] and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.