Posted by replay on 10/19/47 11:34
amir.meshkin@gmail.com wrote:
> Hi,
> I am working on something simple for my <a
> href="http://www.mytuneslive.com">website</a>.
>
> I have a table in a database with HTML stored. Lets say the table is
> named "ads"
>
> the field is named "TopSongs"
>
> I want to simply pull information from the database into an HTML table.
> So in the HTML table, I just want "echo $HtmlFromDatabase"
>
> I'm very new at PHP and have been developing from what I have learned
> on the internet and with one book the past two months. I appreciate
> the help.
>
> Thank You
>
try something like that:
$result = mysql_query("select bla from bla");
echo "<table>";
while ($line = mysql_fetch_array($result, MYSQL_NUM))
{
echo "<tr>";
foreach($line as $value)
{
echo "<td>" . $value . "</td>";
}
echo "</tr>";
}
echo "</table>";
now you just have to store the td contents into the table...
--
visit: http://www.h4xx0r.ch
[Back to original message]
|