这是注册页面代码。我不知道为什么它会给我一个语法错误。虽然页面中的所有内容都很好。这是代码:
<?php
// Grab User submitted information
if (isset($_POST["Register"])) {
$name = $_POST["Name"];
$email = $_POST["Email_Address"];
$utdid = $_POST["Utd_ID"];
$uname = $_POST["Email_Address"];
$password = $_POST["Password"];
// Connect to the database
$con = mysql_connect("localhost","root","");
// Make sure we connected succesfully
if(! $con)
{
die('Connection Failed'.mysql_error());
}
// Select the database to use
mysql_select_db("planner",$con);
$result = mysql_query("INSERT INTO User(Name, UtdId, Username, Password) VALUES ('$name', '$utdid', '$uname', '$password')");
if($result) {
session_start();
$_SESSION['logged_user']= $uname;
header("Location:CS_MS_Plan.php”);
}
else
{ ?>
<script>alert(“error”);</script>
<?php
}
?>
类似的代码就像桃子登录一样。有什么想法吗?
答案 0 :(得分:0)
这个如果没有关闭
function scrollToID(id, speed) {
var offSet = 10 + $('#bs-example-navbar-collapse-1').height(); // NAVBAR HEIGHT !!!
var targetOffset = $(id).offset().top - offSet;
$('html,body').animate({ scrollTop: targetOffset }, speed);
}