我需要構建HTML頁面來顯示和組織我的結果。我在哪裏放置HTML?我試過了,我得到錯誤。它是否進入PHP腳本? php腳本之後?之前?困惑。通過php建立搜索結果頁面
<?php
if (isset($_POST['Submit'])) {
if (!empty($_POST['reg'])) {
$record = $_POST['reg'];
$query = mysql_query("SELECT * FROM reg_add WHERE reg='" . mysql_real_escape_string($record) . "'");
$result = mysql_num_rows($query);
if ($result != 0) {
$row = mysql_fetch_array($query);
$connect_date = $row['connect_date'];
$reg = $row['reg'];
$first_name = $row['first_name'];
$last_name = $row['last_name'];
$nickname = $row['nickname'];
$gender = $row['gender'];
$birthday = $row['birthday'];
$home_state = $row['home_state'];
$national = $row['national'];
$location = $row['location'];
} else {
header("Location: search_error1.php");
exit;
}
} else {
header("Location: search_error2.php");
exit;
}
}
?>
'我嘗試了,我得到errors'那你試着和你得到了什麼錯誤? – 2012-04-27 14:15:18