function draw_image ()
{
global $frm;
mysql_connect("xxx", "xxx", "xxx") or die(mysql_error());
mysql_select_db("mikk") or die(mysql_error());
$frm = $frm['lid'];
$data = mysql_query ("SELECT hl_listings.date_added, hl_listings.name, hl_listings.hyip_status, hl_statistics.type, hl_statistics.amount FROM hl_listings, hl_statistics WHERE (hl_listings.expiration = 0 || date_added + interval hl_listings.expiration day >= current_date)and (hl_listings.status = 1) and (hl_listings.id = hl_statistics.listing_id) and(hl_listings.id = '$frm')");
$date= hl_listings.date_added;
$name= $data ['hl_listings.date_added'];
$status= hl_listings.hyip_status;
$ptype= hl_statistics.type;
$amm= hl_statistics.amount;
?>
<table frame=border background ="http://www.TheHyipSite.com/images/Image_bk.gif" cellspacing="10">
<tr>
<td><br><br><br><br><br></td>
</tr>
<tr>
<td><center><?php print $name;?></td>
</tr>
<tr>
<td><center>Paying Status image</td>
</tr>
<tr>
<td><center>Votes go here</td>
</tr>
<tr>
<td><center>what do you think?<br></td>
</tr>
<tr>
<td align="center"><A HREF="http://www.TheHyipSite.com">Vote Here</A><br></td>
</tr>
<tr>
<td><br></td>
</tr>
</table>
</html><?
}
The bolded area above are the fields that i want to use within the table below but when i put them in they dont work?! any ideas? By the way to see what im doing look here : http://www.thehyipsite.com/index.php?a=image&lid=2 notice that "lid" in this link is 2 showing 2's date etc etc but it isnt, which is the current problem!
Thanks guys
Mikk
-text edited to show current problem...thanks to Thomas for fixing the first problem
-text edited to show current problem..thanks to Houdini for fixing the second problem!