ch04 - 10.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
</head>
<form method="post" action="ch04 - 11.php">
名稱:<input type="text" name="username"/>
<input type="submit" value="送出"/>
</form>
</html>
ch04 - 11.php
<?php
header('content-type:text/html;charset=utf-8');
// 若 $_POST['username'] 不是空值, 表示
//使用者在 username 欄位中所輸入資料
if ($_POST['username'])
echo $_POST['username'] . ',你好';
else
echo '您忘了輸入姓名!';
?>
ch04 - 14.htm
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>陽春登入網頁</title>
</head>
<body style="text-align:center">
<form method="post" action="ch04 - 15.php">
會員名稱:<input type="text" name="uname"/><br/>
密碼:<input type="password" name="upass"/><br/>
<input type="submit" value="登入"/>
</form>
</body>
</html>
ch04 - 15.php
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8/>
<title>歡迎網頁</title>
<style>
</style>
</head>
<body>
</body>
</html>
沒有留言:
張貼留言