Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
11-28-2012, 10:29 AM #1
- Join Date
- Sep 2012
- Thanked 0 Times in 0 Posts
[HELP]Parse error: syntax error, unexpected T_VARIABLE
Hello guys. I'm having trouble with the error on my codes. Please can someone help me with this problem?
//Connect to our Database
$connect = mysql_connect("localhost","root","") or die("Could not connect to database!");
die("No Database Selected!")
//Selecting Table from Database
$tem1 = "SELECT templates FROM config";
$tem2 = mysql_query($tem1) or die ("Could not select template!");
$template = mysql_fetch_array($tem2);
Thanks in Advance!
11-28-2012, 02:44 PM #2
- Join Date
- Jan 2011
- Thanked 588 Times in 587 Posts
Add the ; to the above.Code:if(!mysql_select_db("animecore", $connect)) die("No Database Selected!");
Five more char. added to satisfy the editor, disregard this.
Users who have thanked sunfighter for this post:
11-28-2012, 07:17 PM #3
By the by, this has nothing to do with MySQL.
Any time you see a message that includes T_VARIABLE or other T_xxx elements it is strictly a PHP error.
If it were a MySQL error, it would say so.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.