大家帮我看看这个问题,谢谢了。很简单的!
《input.php》
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<form method="post" action="count.php">
请填写您的姓名:
<input type="text" name="yourname">
<br>
书籍单价:
<input type="text" name="costofonebook">
<br>
选购书籍数目;
<input type="text" name="NumberOfDaysBuying">
<br>
<input type="submit" value="计算消费总额">
</form>
</body>
</html>
《count.php》
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<?php
$Today=date("l F d,Y");
print ("<H3>$Today</H3>\n");
print ("您好".$yourname.",一共消费了");
print ($costofonebook*$NumberOfDaysBuying);
print " 元。";
?>
</body>
</html>
错误如下:
Saturday July 20,2002
Notice: Undefined variable: yourname in D:\myWeb\ex_6\count.php on line 11
您好,一共消费了
Notice: Undefined variable: costofonebook in D:\myWeb\ex_6\count.php on line 12
Notice: Undefined variable: NumberOfDaysBuying in D:\myWeb\ex_6\count.php on line 12
0 元。
请大家帮我看看,为什么说我没有定义变量?