求教:帮我修改php

<?php // create short variable names $tireqty = $_POST[✀tireqty✀]; $oilqty = $_POST[✀oilqty✀]; $sparkqty = $_POST[✀sparkqty✀]; $address = $_POST[✀address✀]; $DOCUMENT_ROOT = $_SERVER[✀DOCUMENT_ROOT✀];?><html><head> <title>Bob✀s Auto Parts - Order Results</title></head><body><h1>Bob✀s Auto Parts</h1><h2>Order Results</h2><?php$date = date(✀H:i, jS F✀);echo ✀<p>Order processed at ✀;echo $date;echo ✀</p>✀;echo ✀<p>Your order is as follows: </p>✀;$totalqty = 0;$totalqty = $tireqty + $oilqty + $sparkqty;echo ✀Items ordered: ✀.$totalqty.✀<br />✀;if( $totalqty == 0){ echo ✀You did not order anything on the previous page!<br />✀;}else{ if ( $tireqty>0 ) echo $tireqty.✀ tires<br />✀; if ( $oilqty>0 ) echo $oilqty.✀ bottles of oil<br />✀; if ( $sparkqty>0 ) echo $sparkqty.✀ spark plugs<br />✀;}$totalamount = 0.00;define(✀TIREPRICE✀, 100);define(✀OILPRICE✀, 10);define(✀SPARKPRICE✀, 4);$totalamount = $tireqty * TIREPRICE + $oilqty * OILPRICE + $sparkqty * SPARKPRICE;$totalamount=number_format($totalamount, 2, ✀.✀, ✀ ✀);echo ✀<p>Total of order is ✀.$totalamount.✀</p>✀;echo ✀<p>Address to ship to is ✀.$address.✀</p>✀;$outputstring = $date."尀t".$tireqty." tires 尀t".$oilqty." oil尀t" .$sparkqty." spark plugs尀t尀$".$totalamount ."尀t". $address."尀n";// open file for appending@ $fp = fopen("$DOCUMENT_ROOT/../orders/orders.txt", ✀ab✀);flock($fp, LOCK_EX); if (!$fp){ echo ✀<p><strong> Your order could not be processed at this time. ✀ .✀Please try again later.</strong></p></body></html>✀; exit;} fwrite($fp, $outputstring, strlen($outputstring));flock($fp, LOCK_UN); fclose($fp);echo ✀<p>Order written.</p>✀; ?></body></html>html页代码:<html><head> <title>Bob✀s Auto Parts<⼀title><⼀head><body><h1>Bob✀s Auto Parts<⼀h1><h2>Order Form<⼀h2><form action="processorder.php" method=post><table border=0><tr bgcolor=#cccccc> <td width=150>Item<⼀td> <td width=15>Quantity<⼀td><⼀tr><tr> <td>Tires<⼀td> <td align=left><input type="text" name="tireqty" size=3 maxlength=3><⼀td><⼀tr><tr> <td>Oil<⼀td> <td align=left><input type="text" name="oilqty" size=3 maxlength=3><⼀td><⼀tr><tr> <td>Spark Plugs<⼀td> <td align=left><input type="text" name="sparkqty" size=3 maxlength=3><⼀td><⼀tr><tr> <td>Shipping Address<⼀td> <td align=center><input type="text" name="address" size=40 maxlength=40><⼀td><⼀tr><tr> <td colspan=2 align=center><input type=submit value="Submit Order"><⼀td><⼀tr><⼀table><⼀form> <⼀body><⼀html>
2026年09月23日 03:13
有1个网友回答
网友(1):

在html页面中点击提交后出现这样的结果:
Bob's Auto Parts
Order Results
Order processed at 06:58, 9th July

Your order is as follows:

Items ordered: 0
You did not order anything on the previous page!

Total of order is 0.00

Address to ship to is

Your order could not be processed at this time. Please try again later.
怎么让提交后信息保存起来。在xp系统下