how I can retain the preset values in $row
Posted: Tue Sep 14, 2010 4:29 am
Hi
I'm new here and to php!
In the code
$row['user_first_name'] = $userID;
$row['user_last_name'] = '. Please complete this form to register';
$result = mysqli_query($link, 'SELECT * FROM users_table WHERE user_ID="' . $userID . '" And user_entity="' . $entity . '" And user_password="' . $password . '"');
if ($result) {
$row = mysqli_fetch_array($result);
}
$row seems to get cleared even when $result is false, so I never see 'Please complete this form to register'.
Please show me how I can retain the preset values in $row if nothing is returned by the sql query.
Best regards
Chris
I'm new here and to php!
In the code
$row['user_first_name'] = $userID;
$row['user_last_name'] = '. Please complete this form to register';
$result = mysqli_query($link, 'SELECT * FROM users_table WHERE user_ID="' . $userID . '" And user_entity="' . $entity . '" And user_password="' . $password . '"');
if ($result) {
$row = mysqli_fetch_array($result);
}
$row seems to get cleared even when $result is false, so I never see 'Please complete this form to register'.
Please show me how I can retain the preset values in $row if nothing is returned by the sql query.
Best regards
Chris