輸入使用者名稱和密碼登入討論區


"); mysql_select_db("MAPLWEB",$link); $sql = "SELECT * FROM userdata WHERE pawd='"; $sql.= $password."' AND name='".$username."'"; $result = mysql_query($sql); if (($data=mysql_fetch_row($result)) != false) { $_SESSION["username"]=$username; $_SESSION["login_session"] = true; $count=$data[5]; ++$count; echo $count; $up_count="UPDATE userdata Set login_count=".$count; $up_count.=" WHERE name = ".$_SESSION["username"]; $up_date= mysql_query($up_count,$link); header("Location: forum.php"); } else echo "名稱或密碼錯誤!
"; mysql_close($link); } ?>
使用者名稱 :
使用者密碼 :