|
Posted by Andy Hassall on 12/31/05 00:43
On 30 Dec 2005 12:27:39 -0800, byrd.48@rocketmail.com wrote:
>function User_InsertNew($UserFirstName, $UserLastName, $UserEmail,
>$UserPassword,$ActInact){
> global $dbuser, $dbuserpass, $dbserver, $db;
> $sql='INSERT INTO `Users`(`UserFirstName`, `UserLastName`,
>`UserEmail`, `UserPassword`, `ActInact`)
>VALUES("'.$UserFirstName.'","'.$UserLastName.'","'.$UserEmail.'","'.$UserPassword.'","'.$ActInact.'");';
> $connection = mysql_connect($dbserver, $dbuser, $dbuserpass) or die
>("Could not connect to server");
mysql_error() would add more useful information to the error message.
> $catalog = mysql_select_db($db);
Check that this succeeds, similar to the mysql_connect call.
> $result = mysql_query($sql);
Check that this succeeds; it's most likely this is where the error is thrown,
but you're ignoring it at the moment.
> mysql_close();
>}
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
[Back to original message]
|