thanks Derokorian, bradgrafelman
I want to get the fields
item_code
description
allergy_statement
useable_units
region_availability
order_lead_time
ingredients
for item_code 12-100 LITERALLY 12-100, no range, but like i said before i am really new to php and mysql. I have 1187 items that when a user clicks a link in search results it takes them to the product details page for that item code All that data is in my database just can't figure out how to get it out of the database. Is this even the right script to achieve that result.
Have edited the code to fix parse error but still not working nor do i know how AFTER i get the data from the database how to display it in the stops show in first post.
<?php require_once('my connection file');
$query = "SELECT item_code, description, allergy_statement, useable_units, region_availability, order_lead_time, ingredients " .
"FROM products " .
"WHERE item_code = '12-100' ";
$resuts = mysql_query($query)
or die(mysql_error());
while ($row = mysql_fetch_array($resuts)) {
extract ($row);
}
?>
Display here
<title>Product Details 12-100</title>
<body>
<p> </p>
<div align="center">
<table width="889" border="0">
<tr>
<td width="231"><p><img src="images/12-100.jpg" width="231" height="547"></p>
<p><iframe src='includes/product-disclaimer.php' frameborder='0'
width='100%' height='150' ></iframe></td>
<td width="715" align="center" valign="top">
<h1>Product Details</h1>
<h3>DISPLAY DESCRIPTION HERE</h3>
<table width="420" border="0">
<td class="ingreg"> </td>
</table>
<h5>Item Number</h5>
<table width="420" border="0">
<tr>
<td class="ingreg">DISPLAY ITEM_CODE HERE</td>
</tr>
</table>
<h3>Ingredients:</h3>
<table width="420" border="0">
<tr>
<td class="ingreg">DISPLAY INGREDIENTS HERE</td>
</tr>
</table>