I'm making a private messaging system.
But I got the error message just like this again an again.
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\post\includes\pm_send.php on line 12
pm_send.php code is here
<?php session_start(); require_once "connect.php"; $sql = "SELECT id, email FROM users WHERE showing='1'"; $result = mysql_query($sql); $options = ""; $email = $_SESSION['email']; while ($row=mysql_fetch_array($result)){ $USERid = $row['id']; $USERname = $row['email']; $option.="<OPTION VALUE=\"$USERid\">".$USERname."</OPTION>"; } ?>
How to fix it?
Edited by Roger, 22 November 2014 - 08:36 AM.