View Single Post
Old 12-13-2004, 03:18 PM  
Repetitive Monkey
Confirmed User
 
Join Date: Feb 2004
Posts: 3,505
Sloppy! ;) Here's how I would have done it.

PHP Code:
<?
$DBhost="localhost";
$DBuser="userdb";
$DBpass="password";
$DBName="namedb";
if(@mysql_connect($DBhost,$DBuser,$DBpass)){
    if(@mysql_select_db($DBName)){
        if(!@mysql_query("INSERT INTO 'Users' VALUES ('".$_GET["user"]."','".$_GET["password"]."')")){
        echo"Unable to insert new row into table on the database <i>".$DBName."</i>.";
        }
    }else{
    echo"Unable to select the database <i>".$DBName."</i>.";
    }
@mysql_close();
}else{
echo"Unable to connect to MySQL.";
}
?>

Last edited by Repetitive Monkey; 12-13-2004 at 03:21 PM..
Repetitive Monkey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote