I have a php code where I just query to insert rows into table via POST method every thing happens fine with WARNING ,I couldn't figure out why is that a warning message
WARNING MESSAGE IS: Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/a266/public_html/poster.php on line 9
CODE IS:
include "db.php";
$sql=mysql_query("INSERT INTO tb1 (col1,col2) VALUES ('$_val1', '$_val2')");
while($row=mysql_fetch_assoc($sql))
$output[]=$row;
$result="inserted";
NOTE :Value is perfectly inserted into table and returns "inserted" message But why is that warning..?