ok i'm going through sams tutorial for mysql and php, and i'm going through one of the practice scripts right now. This script is trying to teach me how forms can work with php and how you can transfer data between pages. I'm getting the following errors on my page once i submit it:
Notice: Undefined variable: tireqty in C:\Server\Apache2\htdocs\sams\processorder.php on line 15
tires
Notice: Undefined variable: oilqty in C:\Server\Apache2\htdocs\sams\processorder.php on line 16
bottles of oil
Notice: Undefined variable: sparkqty in C:\Server\Apache2\htdocs\sams\processorder.php on line 17
spark plugs
can someone take a look at the code i have for my two files: orderform.html and processorder.php and see what i am doing wrong? thanks,
here's links to code for the two files:
orderform.html
processorder.php
hope to get a response, thank you,
Ryan
Newbie error question about variables
Moderator: General Moderators
Replace it with your super-global variables.blindleaf wrote:where do i put that code?
Code: Select all
<?
echo "<p>Order processed.";
echo date("H:i, jS F");
echo "<br>";
echo "<p>Your order is as follows:";
echo "<br>";
echo $_POST["tireqty"]." tires<br>";
echo $_POST["oilqty"]." bottles of oil<br>";
echo $_POST["sparkqty"]." spark plugs<br>";
?>