if you have the urls to pictures in a database how would you display the actual pictures on a webpage?
Have a server-side program retrieves the URLs from the database, then sends HTML that includes those URLs in <img> tags.
here 's what I have so far
<?php
require_once("functions.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
td {
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: #30C;,
border-right-color: #30C;
border-bottom-color: #30C;
border-left-color: #30C;
}
</style>
</head>
<body>
<?php
navBar();
echo "<form action=\"\" method=\"post\" name=\"catalog\">";
DatabaseConnection();
$query = "SELECT * FROM treats";
$result_set = mysql_query($query) or die(mysql_error());
$i = 0;
echo "<table>";
while ($row = mysql_fetch_array($result_set))
{
echo"<tr><td width=\"400px\">($row['product_pic']{$row['product_id']}.<br />{$row['product_title']}.<br /> {$row['product_Description']}.<br />{$row['product_price']}</td></tr>";
}
echo "</table>";
?>
</form>
</body>'
</html>
Here 's another question. Can I have two columns with different products in each column?
I'm NOT asking anyone to do my programming for me! ! This is a really hard subject for me!
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)