刚刚开始看php,遇到个问题。求大神们解答一下。

2013 年 5 月 7 日3470

inde.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://http://www.zjjv.com///TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>test</title><style type="text/css">body {padding: 0px;margin: 0px;}</style></head><body><div><form action="upload.php" method="post" enctype="multipart/form-data"name="form1"><h2>请输入你的年龄:</h2><input type="text" value=""><button>确定</button></form></div></body></html>

upload.php
<?phpif($_REQUEST['val']){echo "<h1>你的年龄:".$_REQUEST['val']."</h1>";}else{echo "<h1>你根本没有输入,欺骗人家感情</h1>";}?>

0 0