syntax error, unexpected end of file in PHP -
this question has answer here:
- php parse/syntax errors; , how solve them? 12 answers
this registration page code. don't know why giving me syntax error. although in page seems fine. here code:
<?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 database $con = mysql_connect("localhost","root",""); // make sure connected succesfully if(! $con) { die('connection failed'.mysql_error()); } // select database use mysql_select_db("planner",$con); $result = mysql_query("insert 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 } ?>
similar code works peach login. ideas?
this if not closed
if (isset($_post["register"])) {
Comments
Post a Comment