I have this little code snippet, but it’s not really working right now. I always have the resource id#5 error. I searched in google for a few pointers but didn’t found mutch to pass this issue. Here my code
<?php
include 'load_db.php';
$var1 = $_POST["gender_1"];
$var2 = $_POST["gender_2"];
$var3 = $_POST["age"];
$sql = mysql_query("SELECT url FROM links WHERE gender ='".$var1."' AND gender1 ='".$var2."' AND age ='".$var3."'");
$result_1 = mysql_query($sql)
OR die("Error: $sql </br>".mysql_error());
echo $result_1;
?>
Error: Resource id #5
You are using twice
mysql_query(), removemysql_query()from$sql:then loop in results: