求教:帮我修改php

来源:百度知道 编辑:UC知道 时间:2024/07/02 23:00:07
<?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

在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系统下