-3
我有一个工作表单,当你点击“提交”它会把你带到一个结果页面 - 一切都好。如何设置PHP表单结果页面的样式?
但是,是否可以添加div等,使页面看起来更好?如果是这样,怎么样?在我添加div的时刻只是忽略它们!
感谢, 斯蒂芬
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico" />
<link rel="stylesheet" href="styleResults.css" type="text/css" media="all" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<TITLE>Ideo Accounting - Results</TITLE>
</head>
<body>
<H2>Results</H2>
<?
$customers = $_POST['customers'];
$suppliers = $_POST['suppliers'];
$bank = $_POST['bank'];
$creditcard = $_POST['creditcard'];
$totalqty = 0;
$totalamount = 0.00;
define("PRICE", 0.75);
$totalqty = $customers + $suppliers + $bank + $creditcard;
$totalamount = number_format($totalqty*PRICE, 2);
echo "<BR>\n";
echo "Total transactions: $totalqty<br>\n";
echo "Estimated monthly fee: £$totalamount<BR>\n";
?>
</body>
</html>
我试过你说的代码的改进建议,但它说: 语法错误,在第35行意外 '='(即交易总额:;) 。 ... –
Steph
2010-02-12 13:08:29
行
我认为它更像这样:<?php echo $ totalqty; ?>
– 2010-02-12 13:18:33
@Phill @Steph欢呼,好点。我忘记了'='符号只适用于短打开标签。改变了这个例子。 – 2010-02-12 13:44:23