• Parse error: syntax error, unexpected T_ELSE
    2 replies, posted
[php] function register($name,$pass) { $sql="SELECT * FROM $tbl_name WHERE username='$name'"; if ($sql); { Echo("$myusername Already Exist!"); } else { mysql_query("INSERT INTO members (username, password)VALUES ('$name', '$pass')"); } } [/php] what am i doing wrong? im new to php.
If statements don't require semicolons. /thread
i found that out before, thanks anyways
Sorry, you need to Log In to post a reply to this thread.