PDA

View Full Version : Mysql



RyanDOT
14-02-2009, 12:09 PM
Parse error: syntax error, unexpected ';' in /home/sitename/public_html/panel/connect.php on line 10I get that error on Radio DJ Panel

I typed in the mysql details

How to fix it?

Im rubbish at mysql...

+Rep

Agnostic Bear
14-02-2009, 12:13 PM
Has nothing to do with MySQL, it's a php error, post connect.php code.

RyanDOT
14-02-2009, 12:16 PM
<?

//set local variables
$dbhost ="localhost"; //Database Host
$dbuser ="sitename_????"; //Database User
$dbpass ="sitename_????"; //Database Password
$dbname ="sitename_????"; //Database Name

//connect
$db =mysql_pconnect($dbhost,$dbuser,$dbpass;
mysql_select_db($dbname,$db;

?>

scottish
14-02-2009, 12:16 PM
you never closed the bracket on mysql select db...

also should be a space after the = on line before

Jack!
14-02-2009, 12:20 PM
Try This Edit what is blue to you DB details

<?

//set local variables
$dbhost ="localhost"; //Database Host
$dbuser ="Username"; //Database User
$dbpass ="Password"; //Database Password
$dbname ="Database Name"; //Database Name

//connect

$db =mysql_pconnect($dbhost,$dbuser,$dbpass;
mysql_select_db($dbname,$db )

?>

RyanDOT
14-02-2009, 12:24 PM
you never closed the bracket on mysql select db...

also should be a space after the = on line before


Try This Edit what is blue to you DB details

<?

//set local variables
$dbhost ="localhost"; //Database Host
$dbuser ="Username"; //Database User
$dbpass ="Password"; //Database Password
$dbname ="Database Name"; //Database Name

//connect

$db =mysql_pconnect($dbhost,$dbuser,$dbpass;
mysql_select_db($dbname,$db )

?>

Did that, still the same error!

scottish
14-02-2009, 12:26 PM
End of the both lines after //connect

you need the close the bracket

so it'd be


$db = mysql_connect($dbhost,$dbuser,$dbpass);
mysql_select_db($dbname,$db) ;

RyanDOT
14-02-2009, 12:27 PM
End of the both lines after //connect

you need the close the bracket

so it'd be


$db = mysql_connect($dbhost,$dbuser,$dbpass);
mysql_select_db($dbname,$db) ;


Oh thanks, im dumb at mySQL.

Thanks!

iUnknown
14-02-2009, 12:28 PM
Change code to:


<?

//set local variables
$dbhost ="localhost"; //Database Host
$dbuser ="sitename_????"; //Database User
$dbpass ="sitename_????"; //Database Password
$dbname ="sitename_????"; //Database Name

//connect
$db =mysql_pconnect($dbhost,$dbuser,$dbpass);
mysql_select_db($dbname,$db);

?>

DeejayMachoo$
14-02-2009, 01:05 PM
Oh thanks, im dumb at mySQL.

Thanks!

Its PHP not mySQL. Your connecting too a mySQL database through PHP code, it was the PHP that had the error. :)

Agnostic Bear
14-02-2009, 01:11 PM
Its PHP not mySQL. Your connecting too a mySQL database through PHP code, it was the PHP that had the error. :)

Yes because thank you for repeating my post.

DeejayMachoo$
14-02-2009, 01:16 PM
Yes because thank you for repeating my post.

Yourwelcome dan :)

I didnt think he read yours as he continued on to say i can't do mySQL.

Dentafrice
14-02-2009, 02:28 PM
you never closed the bracket on mysql select db...

also should be a space after the = on line before

If you're going to provide someone help, at least know what you are talking about please.

It's not a "bracket" in the mysql_select_db() function.. it is a parenthesis, okay let us repeat it.. parenthesis.

parenthesis - ( )
bracket - { }


Its PHP not mySQL. Your connecting too a mySQL database through PHP code, it was the PHP that had the error. :)

There was just so much and I repeat so much need for you to repeat Dan's post.

scottish
14-02-2009, 02:43 PM
If you posted to help him 3 hours ago then that would've been fine, i don't really care about the name for them, as his problem is now solved so you'll get over it at some point :)

Dentafrice
14-02-2009, 02:57 PM
If you posted to help him 3 hours ago then that would've been fine, i don't really care about the name for them, as his problem is now solved so you'll get over it at some point :)
It doesn't matter if his problem is solved, you provided him incorrect information, and if he actually took that.. he's now going to start calling parenthesis, brackets.

I don't care if you care about the name for them or not, if you're going to help someone, at least make the effort to do it right.

scottish
14-02-2009, 02:59 PM
In future you post before me then :) Problem solved, eh? ;)

Anyways i'm not posting again as i don't feel like being warned/infracted for argueing. You'll get over it at some point.

Dentafrice
14-02-2009, 03:03 PM
In future you post before me then :) Problem solved, eh? ;)

Anyways i'm not posting again as i don't feel like being warned/infracted for argueing. You'll get over it at some point.
You don't get warned/infracted for arguing (there's no e), you get warned and infracted for being rude.


In future you post before me then :) Problem solved, eh? ;)

I don't live on the computer, so I cannot respond to every post, so no.. problem not solved. Easy as that.

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