Jump to content

Recommended Posts

Oppppps....OK

I have mysql database built & my Customers put data through HTML form by my pHP file to the database.
Now to diplay the result on an HTML formagain, I want a query but what i want is the result to desplay in a table format instead of just scramble on the sreen. Am i clear now?

Thanks for your help
Link to comment
https://forums.phpfreaks.com/topic/13149-mysql-query/#findComment-50571
Share on other sites

Someone else had a similar question today, so try looking for it...

Anyway in a nutshell you want to do this...

$string = '<table>';
while ($data = mysql_fetc_array($result, MYSQL_NUM))
{
$string .= '<tr><td>' . $data[0] . '</td></tr>';
}
echo $string . '</table>';

I left out a lot, but I hope it is clear enough... that other post goes into more detail.

EDIT
I found the thread, so I'll give you the link. My post was has what you want in more detail, I believe.

[a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=97058\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?showtopic=97058[/a]
Link to comment
https://forums.phpfreaks.com/topic/13149-mysql-query/#findComment-50579
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.