我正在尝试为网站制作注册页面,但由于某种原因它不会显示我的表格?我似乎无法找到问题,而且之前工作正常。我的网站可以在服务器上访问cs12jkk.icsnewmedia.net
我是利兹大学的第二年本科生,我正在尝试登录和系统作为项目的一部分,并且无法让它显示任何东西!
<?php require_once("functions.inc");?>
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="register.js">
<link rel="stylesheet" type="text/css" href="form.css">
<title>Registration Page</title>
</head>
<body>
<form id="userForm" method="POST" action="register-process.php">
<div>
<fieldset>
<legend>Registration Information</legend>
<div id="errorDiv">
<?php
if (isset($_SESSION['error']) && isset($_SESSION['formAttempt'])) {
unset($_SESSION['formAttempt']);
print "Errors encountered<br />\n";
foreach ($_SESSION['error'] as $error) {
print $error . "<br />\n";
} //end foreach
}
?>
</div>
<label for="fname">First Name:* </label>
<input type="text" id="fname" name="fname" />
<span class="errorFeedback errorSpan"
id="fnameError"> First Name is required</span>
<br />
<label for="lname">Last Name:* </label>
<input type="text" id="lname" name="lname">
<span class="errorFeedback errorSpan"
id="lnameError">Last Name is required</span>
<br />
<label for="email">E-mail Address:*</label>
<input type="text" id="email" name="email">
<span class="errorFeedback errorSpan"
id="emailError">E-mail is required</span>
<br />
<label for="password1">Password:*</label>
<input type="password" id="password1" name="password1"> <span class="errorFeedback errorSpan"
id="password1Error">Password required</span>
<br />
<label for="password2">Verify Password:*</label>
<input type="password" id="password2" name="password2">
<span class="errorFeedback errorSpan"
id="password2Error">Password required</span>
<br />
<label for="addr">Address: </label>
<input type="text" id="addr" name="addr">
<br />
<label for="city">City:</label>
<input type="text" id="city" name="city">
<br />
<label for="state">State:</label>
<select name="county" id="county">
<option></option>
<option value="AL">Alabama</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="FL">Florida</option>
<option value="Il">Illinois</option>
<option value="NJ">New Jersey</option>
<option value="NY">New York</option>
<option value="WI">Wiscon</option>
</select>
<br />
<label for="zip">ZIP:</label>
<input type="text" id="zip" name="zip">
<br />
<label for="phone">Phone Number:</label>
<input type="text" id="phone" name="phone">
<span class="errorFeedback errorSpan"
id="phoneError">Format: xxxx-xxx-xxxx</span>
<br />
<br />
<label for="mobile"> Number Type:</label>
<input class="radioButton" type="radio"
name="phonetype" id="mobile" value="mobile">
<label class="radioButton" for="mobile">Mobile</label>
<input class="radioButton" type="radio"
name="phonetype" id="home" value="home">
<label class="radioButton" for="home">Home</label>
<span class="errorFeedback errorSpan phoneTypeError"
id="phonetypeError">Please choose an option</span>
<br />
<input type="submit" id="submit" name="submit">
</fieldset>
</div>
</form>
</body>
</html>
答案 0 :(得分:0)
如果你在谈论:http://cs12jkk.icsnewmedia.net/RestaurantApplication/register.php 如果你看一下html源代码,你会看到html就在那里。问题出在第5行:
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="register.js">
在您添加/>
后,您没有结束</script>
或register.js
因此,之后的所有html都没有呈现,因为它假定它是您的一部分<script>
。