Nested tables
Last Updated: Dec 07 2010 21:31, Started by
ing3rashu
, Dec 07 2010 21:18
·
0
#1
Posted 07 December 2010 - 21:18
Salut! am un tabel in care este inclus un scrollpanel iar inauntrul lui se afiseaza mai multe tabele in urma unui script php. nu reusesc nicidecum sa fac sa mearga. daca pun in php sa genereze tot tabelul le afiseaza unul dupa altul si nu unul sub altul, iar daca pun tabelul principal in html iar cele nested in php nu afiseaza nimic. aici este codul:
index.html: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR...nsitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <table style="width: 800px;"> <tr> <td style="width: 400px;"> <div style="overflow:auto; width:400px; height: 200px;"> <form action="afiseaza.php" method=POST> </form> </div> <td style="width: 400px;"></td> </tr> </table> </body> </html> afiseaza.php: <?php $host="localhost"; $user="root"; $password=""; $dbname="test"; $cxn = mysqli_connect($host,$user,$password,$dbname) or die ("Couldn’t connect to server."); $query="SELECT * FROM masini"; $result = mysqli_query($cxn,$query) or die ("Couldn’t execute query."); while ($row=mysqli_fetch_assoc($result)){ print "<th width=\"489\" scope=\"col\"><table width=\"733\" height=\"179\" border=\"0\" align=\"center\" background=\"file:///G|/Site-uri/xce.com raw/pic2/contur.png\">"; print "<tr>"; print "<th width=\"42\" scope=\"col\"> </th>"; print "<th width=\"184\" scope=\"col\"> </th>"; print "<th width=\"254\" scope=\"col\"> </th>"; print "<th width=\"199\" scope=\"col\"> </th>"; print "<th width=\"32\" scope=\"col\"> </th>"; print "</tr>"; print "<tr>"; print "<td> </td>"; print "<td>Marca:".$row[marca]."</td>"; print "<td> </td>"; print "<td>An:".$row[an]."</td>"; print "<td> </td>"; print "</tr>"; print "<tr>"; print "<td> </td>"; print "<td>Culoare:".$row[culoare]."</td>"; print "<td> </td>"; print "<td>Status:".$row[status]."</td>"; print "<td> </td>"; print "</tr>"; print "<tr>"; print "<td> </td>"; print "<td> </td>"; print "<td> </td>"; print "<td> </td>"; print "<td> </td>"; print "</tr>"; print "</table></th>"; } ?> |
#2
Posted 07 December 2010 - 21:31
Vezi <td style="width: 400px;"> nu este inchis.Mi se pare ciudat rau codul.
Edited by voxx, 07 December 2010 - 21:33. |
Anunturi
Bun venit pe Forumul Softpedia!
▶ 0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users