943,907 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 593
  • PHP RSS
Dec 25th, 2008
0

DIV Help

Expand Post »
Hi
I had to echo a table from a database in a html column (td) but the problem is the width of that column is increasing when show that para.... Please help me...
Thanks
Rajeesh
Similar Threads
Reputation Points: 10
Solved Threads: 0
Posting Whiz in Training
rajeesh_rsn is offline Offline
265 posts
since Sep 2008
Dec 25th, 2008
0

Re: DIV Help

Urgently help me please.....
Reputation Points: 10
Solved Threads: 0
Posting Whiz in Training
rajeesh_rsn is offline Offline
265 posts
since Sep 2008
Dec 25th, 2008
0

Re: DIV Help

Would you care to be a little more specific? The width of what column is increasing? And why is this a problem? HTML tables will fit to the largest width by default.
Reputation Points: 128
Solved Threads: 43
Posting Whiz
death_oclock is offline Offline
389 posts
since Apr 2006
Dec 26th, 2008
0

Re: DIV Help

Hi,
What exactly you want? Just display all the fields of table in the html table? You wont bother about the width rather you should give border="0" in the table. for eg:- if you have two fields as Name,Age in "person" table, then

php Syntax (Toggle Plain Text)
  1. // made database connections in php
  2. //$sql=mysql_query("select * from person");
  3. <form>
  4. <table border="0">
  5. <tr>
  6. <td>Name</td><td>Age</td>
  7. <?
  8. while($row=mysql_fetch_array($sql))
  9. {
  10. ?>
  11. <td> <? echo $row['Name'];?></td>
  12. <td><?echo $row['Age'];?></td>
  13. <?
  14. }
  15. ?>
  16. </table>
  17. </form>
It automatically displays all Name and Age in person.
Last edited by peter_budo; Dec 29th, 2008 at 5:40 am. Reason: Code tag correction, please use [code] not <code>
Reputation Points: 10
Solved Threads: 1
Newbie Poster
ashafaaiz is offline Offline
20 posts
since Dec 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: comment box
Next Thread in PHP Forum Timeline: need help in php forms..plz





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC