PDA

View Full Version : Grr!!



Tomm
12-12-2005, 06:13 PM
Here some code:


$DBhost = "*****";
$DBuser = "*****";
$DBpass = "****";
$DBName = "*******";
$table = "l****";
mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable to connect to database");

@mysql_select_db("$DBName") or die("Unable to select database $DBName");

$sqlquery = "INSERT INTO $table VALUES("Testuser", $thisisurl)";

$results = mysql_query($sqlquery);

mysql_close();

But it keeps giveing me:

Parse error: parse error, unexpected T_VARIABLE in *********/index.php on line 21

Line 21 is
$DBhost = "*****"; btw :)

Its sooo annoying please help :(

Splinter
12-12-2005, 06:34 PM
what is dj host set to as its easier to make it localhost.. although that would explain the t_variable...

Tomm
12-12-2005, 06:39 PM
what is dj host set to as its easier to make it localhost.. although that would explain the t_variable...

It is set to localhost i just blanked it out xD

nets
12-12-2005, 06:58 PM
Check that there is semi colons on the line(s) above 21 where necessary.

Want to hide these adverts? Register an account for free!