php form problem

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 12
Joined: Tue Jan 21, 2003 2:27 pm

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!

New php-forum User
New php-forum User
Posts: 4
Joined: Tue Jan 21, 2003 2:46 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 :)

Return to “PHP coding => General”

Who is online

Users browsing this forum: Baidu [Spider] and 2 guests