Ok, I tried that and now get the following at signup.php:
Parse error: parse error in /path/path/path/db.php on line 17
Any ideas?
| SitePoint Sponsor |
Ok, I tried that and now get the following at signup.php:
Parse error: parse error in /path/path/path/db.php on line 17
Any ideas?
Now what?![]()
Nothing?![]()
what's that line 17?
Line 17 is:
Any ideas? :Omysql_select_db($db, $dbcnx); or die(mysql_error());
remove ; before or
PHP Code:mysql_select_db($db, $dbcnx) or die(mysql_error());
Ok, did that, but when I try and register I still get:
ANy ideas at this?No Database Selected![]()
Ok, before somebody said to add a line into the places about $db..
So is my db.php suppoed to be like this:
Like this:PHP Code:<?php // db.php
$dbhost = "localhost";
$dbuser = "coaster_coastert";
$dbpass = "********";
function dbConnect($db="coaster_coasterthrills") {
$db = "coaster_coasterthrills";
global $db,$dbhost,$dbuser,$dbpass;
$dbcnx = mysql_connect($dbhost, $dbuser, $dbpass) or die(mysql_error());
mysql_select_db($db, $dbcnx) or die(mysql_error());
return $dbcnx;
}
?>
Or like this:PHP Code:<?php // db.php
$dbhost = "localhost";
$dbuser = "coaster_coastert";
$dbpass = "********";
function dbConnect($db="") {
$db = "coaster_coasterthrills";
global $db,$dbhost,$dbuser,$dbpass;
$dbcnx = mysql_connect($dbhost, $dbuser, $dbpass) or die(mysql_error());
mysql_select_db($db, $dbcnx) or die(mysql_error());
return $dbcnx;
}
?>
I'm not sure which one I should use... right now I use teh first one!PHP Code:<?php // db.php
$dbhost = "localhost";
$dbuser = "coaster_coastert";
$dbpass = "********";
function dbConnect($db="coaster_coasterthrills") {
global $db,$dbhost,$dbuser,$dbpass;
$dbcnx = mysql_connect($dbhost, $dbuser, $dbpass) or die(mysql_error());
mysql_select_db($db, $dbcnx) or die(mysql_error());
return $dbcnx;
}
?>
Should I get the zips over now that the MySQL works and just use that?
That I will try, it might work! :P
Ok, after waiting and waiting for ever for responds here (and thank you for doing so after the worth while wait) I finally got it working!
I think I did so much changing trying to get the MySQL to work, that I f'ed everything up!
So, I got the files out of the zip again, and put the right details that I finally have, and it works!
Thanks for everything all!
~someonewhois

Dont you just hate when you have code that 'should' work, but doesnt?
Bookmarks