Login
I can't find whats wrong in the code below, yet the browser keeps displaying:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /var/www/michael/upload/register.php on line 13
Can anyone correct my error?
<?php
include_once('config.php');
$login_query = "select id, username, password, info from user_login where username='".$_POST['username']."'";
if($result = mysql_query($login_query)){
if($row = mysql_fetch_array($result)){
$_SESSION['error'] = "Username already taken.";
} else {
if($_POST['password'] === $_POST['password2']){
mysql_query("insert into user_login (username, password) values ('".$_POST['username'].")', ('".md5($_POST['password'].")');
if($result = mysql_query($login_query)){
$_SESSION['swf_user'] = mysql_fetch_array($result);
}
} else {
$_SESSION['error'] = "Passwords did not match.";
}
}
}
header("Location: main.php");
?>
__________________
Visit my website at GladiatorStudios.com!
|