Well, you're initializing $food to ""; then testing to see if it has a
value, which it never will.
If you're getting the $food variable from a POST or a GET op, you'll need to
grab it from the appropriate array,
$food = $_POST['food'];
to see what is being passed.
Sr. UNIX Administrator
"Pay It Forward"
> -----Original Message-----
> From: gatimu [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 22, 2003 7:34 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Condition for Adding data
> I need help!, I am quite new to php and I am trying to create
> a condition
> that will load a specific page after a form has been
> submitted to enter
> data in my database, I have tried using this code (I created
> it) but it
> wont work, all I get is a messege on the browser that says "the page
> address incorrect"
> Here is how i have scripted the code
> if ($food=="eggs")
> if ($food=="ham")
> echo "<form name=appForm method=post action=.$pgload.>"
> any ideas on how i can go around this problem?
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php