Quantcast
Channel: Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1616

How to fix Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given ?

$
0
0

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?


Viewing all articles
Browse latest Browse all 1616

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>