Jump to content

mysql_fetch_array() expects parameter 1 to be resource


hazm

Recommended Posts

I face same problem but different program...

 

 <?php
$c=$_REQUEST['course'];
$link = mysql_connect('localhost', 'root', ''); //change the configuration in required
if (!$link) {
    die('Could not connect: ' . mysql_error());
}
mysql_select_db('subject');
print $c;
?>
<select name="subject">
<option>Select Subject</option>
<?php 
$kus= mysql_query("SELECT * FROM subject");
while($row9 = mysql_fetch_array($kus)) 
echo "<option value='$row9[subid]'>$row9[subname]</option>";
}
?> 
</select>
 
error.PNG

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.