Jika Anda mendapatkan banyak hasil, Anda dapat mengulanginya seperti ini:
$getinfo = "select user_firstname, user_middlename, user_lastname from tempuserinfo where user_email ='$ead' and activation_code='$eac'";
$query = mysql_query($getinfo, $db);
while ($row = mysql_fetch_array($query)) {
$firstname = $row['user_firstname'];
$lastname = $row['user_lastname'];
}
Jika Anda hanya mendapatkan satu baris kembali (pastikan Anda menambahkan LIMIT ke pernyataan SQL Anda), maka Anda dapat menggunakan sesuatu seperti ini:
$getinfo = "select user_firstname, user_middlename, user_lastname from tempuserinfo where user_email ='$ead' and activation_code='$eac'";
$query = mysql_query($getinfo, $db);
$row = mysql_fetch_array($query);
$firstname = $row['user_firstname'];
$lastname = $row['user_lastname'];