This line:
PHP Code:
while($row=mysql_fetch_array( $result=mysql_query("select * from tbl_products")))
At each iteration of the while loop this entire line is evaluated. This means that your query is executed and set to the variable $result each time. Try:
PHP Code:
$result=mysql_query("select * from tbl_products");
while($row=mysql_fetch_array( $result))
Also, don't use short tags; use <?php instead of <?
One more thing, as Abel pointed out. Be specific about your problem. What error messages are you getting? What is the expected and actual result of your code?
|