Im not even sure if these are called variables. But I am trying to call information from the database a different way than I usually do.
This is what is not working:
$id = mysql_real_escape_string($_GET['id'], $con);
/* once the file is imported, the variables set above will become available to it */
$select = ("SELECT * FROM shirts WHERE id = '$id' ");
$result = mysql_query($select) or die(mysql_error());
while($row = mysql_fetch_array($result))
{
$id = $id;
$thumb = $row['thumb'];
$title = $row['title'];
$paypal = $row['paypal'];
$tags = $row['tags'];
$price = $row['price'];
}
?>
<div class="storeWrap">
<div class="thumbBox">
<a href="<?php $thumb ?>"rel="lightbox[<?php $id ?>]" title="<?php $title ?>"><img src="<?php $thumb ?>" width="340px"></a>
</div>
<div class="descMain">
<h2 align="left"><?php $title ?></h2><br />
<div align="right"><?php $paypal ?> </div>
</div>
</div>
I usually do this with limited issues:
echo "<div class='storeWrap'>";
$select = ("SELECT * FROM shirts ");
$result = mysql_query($select) or die(mysql_error());
while($row = mysql_fetch_array($result))
{
echo "<div class='shirtWrap'><div class='shirtThumb'>.......";
}
echo "</div>";
Any suggestions on why my first block of code doesnt work? The page loads but I do not get any errors and I do not see the shirt I am trying to load.
Thanks,
Brian