I can't seem to find where my code has went wrong. Here is my full error:
Parse error: syntax error, unexpected T_VARIABLE in C:\xampp\htdocs\GigaLoad.com\register.php on line 102
But I've been looking a that line for hours. I will give you the entire code cause my newbie brain cant find the error:
$query = mysql_query("SELECT * FROM users WHERE username='$username'")
Hope you can help if you need more info just let me know.
Here Is The Extra Code
if (strstr($email, "@") && strstr($email, ".") && (strlen($email) >=6)){
require ("scripts/connect.php")
$query = mysql_query("SELECT * FROM users WHERE username='$username'") // <-- Error here
$numrows = mysql_num_rows ($query)
if ($numrows == 0){
/* ... */
EDIT:
I am still getting major erros i will give the code and can you tell what i am missing
A T_VARIABLE is a Token of type VARIABLE. When the parser processes tokens, it tries to make sense of them, and throws errors if it receives a variable where none is allowed.
Unexpected – This means the code is missing a character and PHP reaches the end of the file without finding what it's looking for.
In computer science, a syntax error is an error in the syntax of a sequence of characters or tokens that is intended to be written in a particular programming language. For compiled languages, syntax errors are detected at compile-time. A program will not compile until all syntax errors are corrected.
If that is the entire line, it very well might be because you are missing a ;
at the end of the line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With