Jump to content

SUBIECTE NOI
« 1 / 5 »
RSS
Cum sterg mails din Promotions

Vanzare cumparare fara transfer b...

Receptie ciudata, in functie de t...

Dupa 20 ani de facultate, am uita...
 Mobile.de ofera imprumut de bani ...

problema test grila

Digi24 a disparut de pe TV Lg

Drept de proprietate intelectuala...
 Jante noi shitbox

Trinitas TV 4K

Dacia 1316 cu 6 usi ...

Frecventa modificata radio
 Un nou pericol pt batrani

Ar trebui sa vindem imobiliarele ...

Dupa renuntarea la aparat dentar

pelerinaj in Balcik
 

Nested tables

- - - - -
  • Please log in to reply
1 reply to this topic

#1
ing3rashu

ing3rashu

    Member

  • Grup: Members
  • Posts: 389
  • Înscris: 31.07.2008
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\">&nbsp;</th>";
        print "<th width=\"184\" scope=\"col\">&nbsp;</th>";
        print "<th width=\"254\" scope=\"col\">&nbsp;</th>";
        print "<th width=\"199\" scope=\"col\">&nbsp;</th>";
        print "<th width=\"32\" scope=\"col\">&nbsp;</th>";
      print "</tr>";
      print "<tr>";
        print "<td>&nbsp;</td>";
        print "<td>Marca:".$row[marca]."</td>";
        print "<td>&nbsp;</td>";
        print "<td>An:".$row[an]."</td>";
        print "<td>&nbsp;</td>";
      print "</tr>";
      print "<tr>";
        print "<td>&nbsp;</td>";
        print "<td>Culoare:".$row[culoare]."</td>";
        print "<td>&nbsp;</td>";
        print "<td>Status:".$row[status]."</td>";
        print "<td>&nbsp;</td>";
      print "</tr>";
      print "<tr>";
        print "<td>&nbsp;</td>";
        print "<td>&nbsp;</td>";
        print "<td>&nbsp;</td>";
        print "<td>&nbsp;</td>";
        print "<td>&nbsp;</td>";
      print "</tr>";
    print "</table></th>";
  
}
?>

#2
voxx

voxx

    Active Member

  • Grup: Members
  • Posts: 1,160
  • Înscris: 29.03.2007
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

Forumul Softpedia foloseste "cookies" pentru a imbunatati experienta utilizatorilor Accept
Pentru detalii si optiuni legate de cookies si datele personale, consultati Politica de utilizare cookies si Politica de confidentialitate