我需要构建 HTML 页面来显示和组织我的结果。我在哪里放置 HTML?我试过了,我得到了错误。它是否进入 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;
}
}
?>