razzor Posted February 23, 2007 Share Posted February 23, 2007 Here's my problem, I built an HTML form to process my order using html kit. Now when I plug in numbers in my form, a new browser opens up and spits out all the code from my "processorder.php" including all my html tags. What can I do to make my form process my order? Thanks, Here's a look at what I get once hit submit: <html> <head> <title>Bob's Auto Parts - Order Results</title> </head> <body> <h1>Bob's Auto Parts</h1> <h2>Order Results</h2> <?php //create short variable names $tireqty=$_POST['tireqty']; $oilqty=$_POST['oilqty']; $sparkqty=$_POST['sparkqty']; //variable declarations $totalqty=0; $totalamount=0.00; //constant definitions define ('TIREPRICE',100); define ('OILPRICE',10); define ('SPARKPRICE',4); $totalqty=0; $totalqty=$tireqty + $oilqty+$sparkqty; $totalamount =$tireqty*TIREPRICE +$oilqty*$OILPRICE +$sparkqty*SPARKPRICE; $taxrate = 0.1; //local tax rate is 10% $totalamount=$totalamount * (1+$taxrate); echo 'isset($tireqty): '.isset($tireqty).'<br />'; echo 'isset($nothere): '.isset($nothere).'<br />'; echo '<p>Order processed at '; echo date('H:i, jS F'); echo '</p>'; echo '<p>Your order is as follows: </p>'; echo $tireqty.' tires<br />'; echo $oilqty.' bottles of oil<br />'; echo $sparkqty.' spark plugs<br />'; echo 'Items ordered: '.$totalqty.'<br />'; echo 'Subtotal: $'.number_format($totalamount,2).'<br />'; echo 'Total including tax: $'.number_format($totalamount,2).'<br />'; ?> </body> </html> Quote Link to comment Share on other sites More sharing options...
btherl Posted February 23, 2007 Share Posted February 23, 2007 It sounds like your web server is not configured to run php. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.