View Single Post
Old 05-03-2005, 08:56 PM   #22 (permalink)
BUFFY
Registered User
 
Join Date: May 2005
Posts: 29
BUFFY is on a distinguished road
Thanks for the error checking code DJ

I updated the reg.inc.php but I am still not updating the database.

Also updated my connect.inc.php:
PHP Code:
<?PHP
//Include file

//Connect to the database
$db=mysql_connect("localhost""xxx""xxx"
or die(
"Could not connect to localhost."); 

//Commented this out as its in the wrong place and effecting the database.
//Dj's security check code
//$result = mysql_query($sql, $db_connection);
//if ($result === false) {
//  die(mysql_error($db_connection));
//} 

//Select database
if (!@mysql_select_db("techdatabase",$db)) 
    {
    exit(
'<p>Unable to select database.</p>');
        } else {
        
//Connection successful
    
}
?>
Going to go back to the reg.inc.php, now that I put in the error checking code this appeared "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(title, firstname, lastname, username, password, address, suburb, city, phonenum' at line 1"
So I'll get on to it and keep looking around for any INSERT code Ive missed. Thanks.

Thanks redhead aswell for your help.

Last edited by BUFFY; 05-03-2005 at 09:28 PM.
BUFFY is offline   Reply With Quote