Untitled
unknown
plain_text
2 years ago
758 B
19
Indexable
if ($query) {
$getEmailIdQuery = "SELECT AcctID FROM Tbl_Customer WHERE email = ?";
$getEmailIdParams = array($txtemail);
$getEmailIdResult = sqlsrv_query($conn, $getEmailIdQuery, $getEmailIdParams);
if ($getEmailIdResult) {
$row = sqlsrv_fetch_array($getEmailIdResult, SQLSRV_FETCH_ASSOC);
$customerIdByEmail = $row['AcctID'];
echo "Customer ID for email $txtemail: " . $customerIdByEmail;
sqlsrv_free_stmt($getEmailIdResult);
} else {
echo "Error fetching Customer ID: " . print_r(sqlsrv_errors(), true);
}
} else {
echo "Error in INSERT statement: " . print_r(sqlsrv_errors(), true);
}
sqlsrv_close($conn);Editor is loading...
Leave a Comment