By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
462,155 Members | 681 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,155 IT Pros & Developers. It's quick & easy.

Parse error: syntax error, unexpected $end

P: 2
Hi guys im having trouble with somethings else now can you help out thanks!!
Im getting this error message
Parse error: syntax error, unexpected $end

Here's my code cheers!!]
// Connects to your Database
mysql_connect("aldridge3", "root", "") or die(mysql_error());
mysql_select_db("dwalk96") or die(mysql_error());

//Checks if there is a login cookie

//if there is, it logs you in and directes you to the members page
$username = $_COOKIE['ID_my_site'];
$password = $_COOKIE['Key_my_site'];
$check = mysql_query("SELECT * FROM signup WHERE username = '$username'")or die(mysql_error());
while($info = mysql_fetch_array( $check ))
if ($password != $info['password'])
header("Location: memberspage.html");


//if the login form is submitted
if (isset($_POST['submit'])) { // if form has been submitted

// makes sure they filled it in
if(!$_POST['username'] | !$_POST['password']) {
die('You did not fill in a required field.');
// checks it against the database

if (!get_magic_quotes_gpc()) {
$_POST['email'] = addslashes($_POST['email']);
$check = mysql_query("SELECT * FROM users WHERE username = '".$_POST['username']."'")or die(mysql_error());

//Gives error if user dosen't exist
$check2 = mysql_num_rows($check);
if ($check2 == 0) {
die('That user does not exist in our database.
<a href=sign-uppage.html>Click Here to Register</a>');
while($info = mysql_fetch_array( $check ))
$_POST['password'] = stripslashes($_POST['pass']);
$info['password'] = stripslashes($info['password']);
$_POST['password'] = md5($_POST['pass']);

//gives error if the password is wrong
if ($_POST['password'] != $info['password']) {
die('Incorrect password, please try again.');
Aug 8 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 1,044
Im getting this error message
Parse error: syntax error, unexpected $end
That error message means that your script ended before the parser expected it to. You likely forgot to close a pair of parentheses or brackets.
Aug 8 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.