Page 1 of 1

php data in a html table

Posted: Thu Oct 29, 2009 10:45 am
by nhb
I've created a table in html that is quite large and complex. The table contains input fields where the user enters data. The data is then inserted into a mysql database using a php script. That part all works fine.

The next thing I want to do is display the entered data in the same table (with a renamed htm file). I can get the data from the database with a bit of php ok, but how do I display it in the html table? The query strings that are returned from the database need converting some how I suppose.

Re: php data in a html table

Posted: Fri Oct 30, 2009 12:00 pm
by davegmpd
What *do* you get back from the DB?
The query strings that are returned from the database need converting some how
Not sure what you mean - perhaps explain more?

Have you tried Googling this?!? I found this pretty quickly which probably is similar to what you're trying:

http://www.wellho.net/resources/ex.php4 ... /mqxyz.php

Dave

Re: php data in a html table

Posted: Fri Oct 30, 2009 12:23 pm
by nhb
Sorted. Quite easy really, not sure why I didn't think of it before.

I put <php echo $string; ?> in the html table where I want to display it, where $string is the name of the string content I want to display.

8)

Re: php data in a html table

Posted: Mon Nov 02, 2009 12:28 am
by guru2k9
Hi

You have missed the the question tag before php
<php echo $string; ?> it should be <?php echo $string; ?>

Thanks