Jump to content

connect error


avatar.alex

Recommended Posts

Ok this code doesn't look wrong but i cant figure out whats going on?

<?php
//connect.php
$server	= 'localhost';
$username	= 'admin';
$password	= 'pass';
$database	= 'gms';

if(!mysql_connect($server, $username,  $password))
{
	exit('Error: could not establish database connection');
}
if(!mysql_select_db($database)
{
	exit('Error: could not select the database');
}
?>

 

ERROR

Parse error: syntax error, unexpected '{' in /home/adee67/public_html/forum/connect.php on line 13

 

Link to comment
https://forums.phpfreaks.com/topic/225833-connect-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.