PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<body>
<?
$sql= "SELECT * FROM products WHERE product_shown='1'";
$productResult = mysql_query($sql) or die (mysql_error());
$p=0;
while ($row = mysql_fetch_array($productResult, MYSQL_ASSOC)){
}
?>
Yes, but if you use any user supplied values in your SQL, such as from $_GET, $_POST, etc., then you need to validate them and always use the database's escape function.