Reply to Re: MySQL Database to HTML Table using PHP

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация