I actually did get the form and script to behave and work correctly as written below. I think my configuration was off though I did a mass reconfigure so which particular steps made it work I have no idea. I did dump all my dll's into my /system32 directory. Anyway, I still get the same warning in Zend Studio as to the "undefined index" and will try to figure that out. Regardless it works correctly on the web page. Thanks Stuart
Adam Goossens <[EMAIL PROTECTED]> wrote:Stuart, This problem occurs when you try to access an index in an array that does not exist. First off, make sure that your variables are getting passed to the script via POST. Do this by calling the function print_r(), and passing the $_POST array as an argument to it. print_r($_POST); That will dump the entire contents of the _POST array onto the screen, so you may check exactly what's in there. This may give you a clue as to what is going wrong. I tested your script on my 4.3.2 build, and it worked fine. If $_POST doesn't work, give $HTTP_POST_VARS a try. If that doesn't work, I'm stumped. What web server are you using? -Adam. Stuart Felenstein wrote: > I can't believe Chapter 1 , section 1 and I'm off to a bad start already. > Using this form and script, I keep getting "undefined index" for the variables I > declare in the script. Running PHP 4.3.2 on XP Pro. Thanks. > Stuart > > Form: > > > > > Item > Quantity > > > Tires > [input] > maxlength="3"> > > > Oil > [input] > > > Spark Plugs > [input] > maxlength="3"> > > > [input] > > > > > Script: > > > > > > > Bob's Auto Parts > Order Results > > //create short variable names > $tireqty = $_POST['tireqty']; > $oilqty = $_POST['oilqty']; > $sparkqty = $_POST['sparkqty']; > ?> > > echo ' Your order is as follows: '; > echo $tireqty.' tires '; > echo $oilqty.' bottles of oil '; > echo $sparkqty.' spark plugs '; > ?> > > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php