I am getting this error on my wepage
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
This is my code:
<?php
require_once("connect.php");
if(isset($_GET['userSearch'])) {
$srch=$_GET['userSearch'];
$allMov = "SELECT * FROM tbl_handbags WHERE handbags_name LIKE '%".
$srch."%' ORDER BY handbags_name";
} else if (isset($_GET['nav'])) {
$select=$_GET['nav'];
$allMov = "SELECT * FROM tbl_handbags, tbl_cat, tbl_l_hc WHERE tbl_handbags.handbags_id=tbl_l_hc.handbags_id AND tbl_cat.cat_id=tbl_l_hc.cat_id AND tbl_cat.cat_name = '".$select."' ORDER BY tbl_handbags.handbags_id ASC";
}
else{
$allMov = "SELECT * FROM tbl_handbags ORDER BY handbags_id ASC";
}
$movResults = mysql_query($allMov);
?>
And this is the line with the coding error:
while($row = mysql_fetch_array($movResults)){
It worked the entire time I was building the site but as soon as I went live it fell apart.
Can someone please help me out??
Thank you