Hi,
I've been struggle with the code below.
I've tried mysql_fetch_ass oc and various other functions, but can't
seem to get it to work.
The code works as far as that point though.
Any suggestions?
Jules.
global $first_name;
global $last_name;
global $password;
function get_acct_rec($e mail){
$conn = db_connect(HOST , USER, PASS, DB, PORT);
$sql = "SELECT * FROM `clients` WHERE `email` = '" . $email . "';";
$c_result = mysql_query($sq l, $conn) or die("Failed to execute query
at line " . __LINE__ . ": " . db_error($conn) );
while ($row = mysql_fetch_ass oc($c_result)) {
$first_name = $row['first_name'];
$last_name = $row['last_name'];
$password = $row['password'];
echo $row['first_name'];
}
mysql_free_resu lt($result);
db_close($conn) ;
}
I've been struggle with the code below.
I've tried mysql_fetch_ass oc and various other functions, but can't
seem to get it to work.
The code works as far as that point though.
Any suggestions?
Jules.
global $first_name;
global $last_name;
global $password;
function get_acct_rec($e mail){
$conn = db_connect(HOST , USER, PASS, DB, PORT);
$sql = "SELECT * FROM `clients` WHERE `email` = '" . $email . "';";
$c_result = mysql_query($sq l, $conn) or die("Failed to execute query
at line " . __LINE__ . ": " . db_error($conn) );
while ($row = mysql_fetch_ass oc($c_result)) {
$first_name = $row['first_name'];
$last_name = $row['last_name'];
$password = $row['password'];
echo $row['first_name'];
}
mysql_free_resu lt($result);
db_close($conn) ;
}
Comment