作者bitchdog (上吧傑尼龜)
看板PHP
標題[請益] 我是新手遇到難題
時間Thu Jun 19 20:31:51 2008
<html>
<head> <title></title> </head>
<body>
<form action="Ch9-3-2.php" method="post">
<?
$school=$_POST["school"];
switch ($school) {
case "teacher":
學號:<input type="t1" name="User" size="20"><br> <br>
姓名 :<input type="t2" name="Pass" size="20"><br> <br>
資料庫 :<input type="t3" name="a" size="20"><br> <br>
系統分析:<input type="t4" name="b" size="20"><br> <br>
LINUX :<input type="t5" name="c" size="20"><br> <br>
PHP : <input type="t6" name="d" size="20"><br><br>
<input type ="submit" value="老師登記">
break;
case "student":
學號:<input type="t1" name="User" size="20"><br> <br>
<input type ="submit" value="學生登入">
break;
}
?>
</form>
</body>
</html>
這是我的程式碼
跑不出來
我不懂錯在哪
有人可以教一下嗎
--
老爹:"櫻木 你的優勢是什麼?"
櫻木:"帥氣的灌籃 臉蛋 全身上下都贏他"
老爹:"是你的速度和靈活度"
http://www.wretch.cc/album/ashin65
我的拍賣
http://class.ruten.com.tw/user/index00.php?s=ashin65
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 192.83.195.222
→ starjou:html & php code 沒分開 06/19 20:47
→ bitchdog:那是要分成兩張嗎 06/19 21:19
推 ybite:你這個code要讀$_POST,那你應該要用<form>來跑進去啊 06/19 21:21
→ ybite:(如果你想用xx.php?school=teacher的話要讀$_GET['school']) 06/19 21:22
→ ybite:啊等等,我發現問題不在這裡 囧 06/19 21:23
→ bitchdog:我還有其他張,只是其他張都沒問題,只有這張怪怪的 06/19 21:25
推 nigerc :PHP的開頭是<?PHP 結尾是 ?> 你好像少了 07/10 12:36