Bruce Cowin wrote:
> Strange. Do you know it's the password causing the problem? What if you
> pass an empty string for the password and see if the insert works?
>
>
Good suggestion Bruce, thank you. Did the blank password and still get
the same error therefore possibly I am misunderstanding the PHP Manual,
where it says:-
mixed *mssql_query* ( string query [, resource link_identifier [, int
batch_size]] )
Returns: A MS SQL result resource on success, *TRUE* if no rows were
returned, or *FALSE* on error.
and my code reads:-
$passwd = ""; // for debugging only
$insert = sprintf("INSERT INTO Users (FirstName, LastName, Usrname,
Passwrd, AccessLevel, last_login, UserID)
VALUES ('%s', '%s', '%s', '%s', '%d', '%s', '%d')",
$FirstName, $Surname, $uname, $passwd,
$accesslevel, $regdate, $_SESSION['UID']);
$Reply = mssql_query($insert, $link);
if ($Reply == FALSE)
{
$Message = sprintf("%s %d <br>Record not inserted. Please refer
problem to Admin.", __FILE__, __LINE__);
trigger_error($Message, E_USER_ERROR, $link);
exit;
}
Maybe on an insert, no rows would be returned and therefore I possibly
should be checking for something else?
--
Regards,
Alf Stockton www.stockton.co.za
Q: Why is it that Mexico isn't sending anyone to the '84 summer games?
A: Anyone in Mexico who can run, swim or jump is already in LA.
My email disclaimer is available at www.stockton.co.za/disclaimer.html
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php