Re: Training Help

From: Date: Fri, 12 Sep 2003 11:29:14 +0000
Subject: Re: Training Help
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-162410@lists.php.net to get a copy of this message
Thanks mate, problem kinda fixed, looks like this now... <html> <head> <title>Bob's Auto Parts - Order Results</title> </head> <body> <h1>Bob's Auto Parts</h1> <h2>Order Results</h2> <? $tireqty = $_POST['tireqty']; $oilqty = $_POST['oilqty']; $sparkqty = $_POST['sparkqty']; echo "<p>Order Processed at "; echo date("H:i, "); echo "on "; echo date ("jS F"); echo "<br>"; echo "<p>Your order is as follows:"; echo "<br>"; echo $tireqty." tires<br>"; echo $oilqty." bottles of oil<br>"; echo $sparkqty." spark plugs<br>"; ?> </body> </html> Ryan "Jon Haworth" <jon@laughing-buddha.net> wrote in message news:008101c37920$944cee90$050a0a0a@eris... > Hi Ryan, > > Sounds like register_globals is turned off on your server (this is generally > a Good Thing). Rather than having all your form fields converted directly > into variables - which your book is assuming, as it's how PHP used to do > it - you'll need to access them via the $_POST array. > > Try changing this line: > > > echo $tireqty." tires<br>"; > > To this: > > echo $_POST["tireqty"]. " tires<br>"; > > Search the manual or the list archives for "register_globals" and you'll get > loads of info about this. > > Cheers > Jon

« previous php.general (#162410) next »