Well, you would create a table like this
echo tabletrtdname/tdtdage/tdtdsex/td/tr;
Then, you would do a query (assuming you've already made a connection to
your database)...
$result = mysql_query(SELECT name,age,sex FROM database.usertable);
Then, run through the results...
while ($row = mysql_fetch_assoc($result))
{
echo
trtd.$row[name]./tdtd.$row[age]./tdtd.$row[sex]./td/tr;
}
Then, end the table like this
echo /table;
There you have it.
- Original message -
From: andy amol [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Date: Sun, 25 Apr 2004 19:47:37 -0700 (PDT)
Subject: [PHP-DB] How to display table columns
hi,
I want to display the table coulumns along with those values below it.
I am only able to display the table values, now I want to diplay the
corresponding table attribut above the value.
eg : name age sex
abc1m
xyz 2f
I want to display name, age and sex.
I am using mysql as database.
thanks in advance.
-
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
--
Marcjon
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php