This question already has an answer here:
i have an error like this
Warning: mysql_fetch_array() expects parameter 1 to be resource, string given in /home/sibisier/public_html/customer/input_customer_issue.php on line 543
and this is the code in line 543
$query_email = "SELECT employee.nip, employee.nama, employee.job_title,
employee.unit_id, employee.business_email, unit.nama_unit
FROM employee
INNER JOIN unit ON employee.unit_id = unit.unit_id
where employee.job_title IN('Team Leader','Assistant Relationship Manager','PROFESSIONAL STAFF')
AND employee.unit_id IN(12)";
$resul1 = mysql_query($query_email) or die(mysql_error());{
$to = $resul1['business_email'];
$subject = 'Notifikasi';
$message = "<table>";
$message .= "<tr><td>Date</td><td>:</td><td>" . $tanggal_sekarang . "</td></tr>";
$message .= "<tr><td>NIP</td><td>:</td><td>" . $nip . "</td></tr>";
$message .= "<tr><td>Unit</td><td>:</td><td>" . $resul1['nama_unit'] . "</td></tr>";
$message .= "<tr><td>CIF</td><td>:</td><td>" . $cif . "</td></tr>";
$message .= "<tr><td>Comment</td><td>:</td><td>" . $comment . "</td></tr>";
$message .= "</table>";
$headers = "From: admin@sibisiser.com
";
$from .= "Reply-To: zack.zacky14@gmail.com
";
$from .= "Content-type: text/html
";
mail($to, $subject, $message,$headers, $from);
echo "Mail Sent.";
i have no idea, i've been search and always get this error.
please i need help. thanks
</div>