Posted by annie on 11/16/05 02:40
what im looking to do is hve a page grab data from a DB
would like to pull the data out from the DB
the data base contains
id title url text startdate experation
would like the lookup to grab the data
and paste it into the table..DB will have multiple entry's
the experation is just a number like 7-14 so it is days that it runs
would like to have the data outputed like
<a href=http://$url>$title</a>
$text
Ends $startdate + $experation (like 11/15/2005 + 14 = 11/29/2005)
would also need an if statement so if the startdate + experation is
expired dont show this ad...
hope this helps thoughts are crossing...
annie
<?php
$result=mysql_query("select * from text_ads ORDER BY `date` DESC");
while ($row = mysql_fetch_array($result)) {
$title = $row["title"];
$url = $row["url"];
$text= $row["text"];
$startdate = $row["date"];
$experation = $row["expiration"];
echo
"<table border='1' width='125'>".
"<tr><td><a class=link href=\"$url\" target='_balnk'>$title</a>
</td></tr>" .
"<tr><td><div align =center>$text</div></td></tr>" .
"<tr><td><div align =center>$experation</div></td><tr>" .
"</table>";
}
?>
Navigation:
[Reply to this message]
|