carinacosta Posted April 3, 2012 Report Share Posted April 3, 2012 Neste código que se segue aparece me abaixo da tabela dados todos baralhados, será alguma div fora do sitio ou alguma td? <?php include ('ligacao.php'); $sql1 = "SELECT * FROM ordensfabrico "; $sel1 = pg_query($sql1); if (pg_num_rows ($sel1) > 0){ echo "<center>"; echo "<div style= 'height: 500px; width:600px; overflow:scroll;'>"; echo "<table border='2' cellspacing='0' style='WIDTH:600px;BORDER-COLLAPSE:collapse' >"; echo "<tr>"; echo "<td bgcolor='#0099CC' style='WIDTH:2000px'>"; echo "<center>"; echo "Numordfab" ; echo "</center>"; echo "</td>"; echo "<td bgcolor='#0099CC' style='WIDTH:2000px'>"; echo "<center>"; echo "Datordfab"; echo "</center>"; echo "</td>"; echo "<td bgcolor='#0099CC' style='WIDTH:2000px'>"; echo "<center>"; echo "Ficof"; echo "</center>"; echo "</td>"; echo "<td bgcolor='#0099CC' style='WIDTH:5000px'>"; echo "<center>"; echo "Especificação"; echo "</center>"; echo "</td>"; echo "</tr>"; while($row = pg_fetch_array($sel1)) { echo "<tr>"; echo "<td><a href=''>"; echo $row ['id']; echo "</td>"; echo "<td><a href=''>"; echo $row ['numordfab']; echo "</td>"; echo "<td>"; echo $row ['datordfab']; echo "</td>"; echo "<td>"; echo $row ['ficof']; echo "</td>"; echo "<td>"; echo $row ['especificacao']; echo "</td>"; echo "</tr>"; if(!empty($row ['id'])){ echo "<td colspan='4'>"; /*$sql2 = "SELECT p.id, p.numprm, p.datprm, p.desprm, p.aprovado, p.idof "; $sql2.= "FROM prm as P "; $sql2.="INNER JOIN prmlin "; $sql2.="ON P.id=prmlin.idpalin "; $sql2.="INNER JOIN PRM "; $sql2.="ON prmlin.idPAI=PRM.ID "; $sql2.="INNER JOIN ordensfabrico "; $sql2.="ON ordensfabrico.ID=prm.IDOF "; $sql2= '".$ro$sql2.= " where p.idof ['id']."' "; $sel2 = pg_query ($sql2);*/ $sql2 = "SELECT p.id, p.numprm, p.datprm, p.desprm, p.aprovado, p.idof "; $sql2.= "FROM prm as P "; $sql2.=" where p.idof = '".$row ['id']."' "; $sel2= pg_query($sql2); if (pg_num_rows ($sel2) > 0){ echo "<div>"; echo "<table border='2' cellspacing='0' style='WIDTH:600px;BORDER-COLLAPSE:collapse' >"; echo "<tr>"; echo "<td bgcolor='#CCCCCC' style='WIDTH:1000px'>"; echo "<center>"; echo "Aprovado" ; echo "</center>"; echo "</td>"; echo "<td bgcolor='#CCCCCC' style='WIDTH:2000px'>"; echo "<center>"; echo "Desprm" ; echo "</center>"; echo "</td>"; echo "<td bgcolor='#CCCCCC' style='WIDTH:2000px'>"; echo "<center>"; echo "Datprm" ; echo "</center>"; echo "</td>"; echo "<td bgcolor='#CCCCCC' style='WIDTH:2000px'>"; echo "<center>"; echo "numprm" ; echo "</center>"; echo "</td>"; echo "</tr>"; while($row2 = pg_fetch_array($sel2)) { echo "<tr>"; echo "<td>"; echo $row2 ['aprovado']; echo "</td>"; echo "<td>"; echo $row2 ['desprm']; echo "</td>"; echo "<td>"; echo $row2 ['datprm']; echo "</td>"; echo "<td>"; echo $row2 ['numprm']; echo "</td>"; echo "</tr>"; if(!empty($row2 ['id'])){ echo "<td colspan='6'>"; $sql3= "SELECT pr.idpai, pr.posicao, pr.qtdped, pr.codmat, pr.coduni, pr.dimmat, pr.prazo, pr.idpalin "; $sql3.= "FROM prmlin pr "; $sql3.= " where pr.idpai = '".$row2 ['id']."' "; $sel3= pg_query($sql3); if (pg_num_rows ($sel3) > 0){ echo "<div>"; echo "<table border='2' cellspacing='0' style='WIDTH:600px;BORDER-COLLAPSE:collapse' >"; echo "<tr>"; echo "<td bgcolor='#CCCCCC' style='WIDTH:2000px'>"; echo "<center>"; echo "Posição" ; echo "</center>"; echo "</td>"; echo "<td bgcolor='#CCCCCC' style='WIDTH:2000px'>"; echo "<center>"; echo "Qtdped" ; echo "</center>"; echo "</td>"; echo "<td bgcolor='#CCCCCC' style='WIDTH:2000px'>"; echo "<center>"; echo "Codmat" ; echo "</center>"; echo "</td>"; echo "<td bgcolor='#CCCCCC' style='WIDTH:2000px'>"; echo "<center>"; echo "Coduni" ; echo "</center>"; echo "</td>"; echo "<td bgcolor='#CCCCCC' style='WIDTH:2000px'>"; echo "<center>"; echo "Dimmat" ; echo "</center>"; echo "</td>"; echo "<td bgcolor='#CCCCCC' style='WIDTH:2000px'>"; echo "<center>"; echo "Prazo" ; echo "</center>"; echo "</td>"; echo "</tr>"; while($row3 = pg_fetch_array($sel3)) { echo "<tr>"; echo "<td>"; echo $row3 ['posicao']; echo "</td>"; echo "<td>"; echo $row3 ['qtdped']; echo "</td>"; echo "<td>"; echo $row3 ['codmat']; echo "</td>"; echo "<td>"; echo $row3 ['coduni']; echo "</td>"; echo "<td>"; echo $row3 ['dimmat']; echo "</td>"; echo "<td>"; echo $row3 ['prazo']; echo "</td>"; echo "</tr>"; if(!empty($row3 ['idpalin'])){ echo "<td colspan='8'>"; $sql4="SELECT PL.POSICAO,PL.CODMAT, PL.QTDPED,PL.QTDSTOCK, PL.QTDENC, PL.CODUNI, PL.DIMMAT ,PL.prazo "; $sql4.="FROM PALIN AS PL "; $sql4.="INNER JOIN prmlin "; $sql4.="ON PL.id=prmlin.idpalin "; $sql4.="INNER JOIN PRM "; $sql4.="ON prmlin.idPAI=PRM.ID "; $sql4.="INNER JOIN ordensfabrico "; $sql4.="ON ordensfabrico.ID=prm.IDOF "; $sql4.="where prmlin.idpai= '".$row3 ['idpai']."' "; $sql4.="ORDER BY CODMAT"; $sel4= pg_query($sql4); if (pg_num_rows ($sel4) > 0){ echo "<div>"; echo "<table border='2' cellspacing='0' style='WIDTH:600px;BORDER-COLLAPSE:collapse' >"; echo "<tr>"; echo "<td bgcolor='#CCCCCC' style='WIDTH:2000px'>"; echo "<center>"; echo "Posição" ; echo "</center>"; echo "</td>"; echo "<td bgcolor='#CCCCCC' style='WIDTH:2000px'>"; echo "<center>"; echo "Codmat" ; echo "</center>"; echo "</td>"; echo "<td bgcolor='#CCCCCC' style='WIDTH:2000px'>"; echo "<center>"; echo "Qtdped" ; echo "</center>"; echo "</td>"; echo "<td bgcolor='#CCCCCC' style='WIDTH:2000px'>"; echo "<center>"; echo "Qtdstock" ; echo "</center>"; echo "</td>"; echo "<td bgcolor='#CCCCCC' style='WIDTH:2000px'>"; echo "<center>"; echo "Qtdenc" ; echo "</center>"; echo "</td>"; echo "<td bgcolor='#CCCCCC' style='WIDTH:2000px'>"; echo "<center>"; echo "Coduni" ; echo "</center>"; echo "</td>"; echo "<td bgcolor='#CCCCCC' style='WIDTH:2000px'>"; echo "<center>"; echo "Dimmat" ; echo "</center>"; echo "</td>"; echo "<td bgcolor='#CCCCCC' style='WIDTH:2000px'>"; echo "<center>"; echo "Prazo" ; echo "</center>"; echo "</td>"; echo "</tr>"; while($row4 = pg_fetch_array($sel4)) { echo "<tr>"; echo "<td>"; echo $row4 ['posicao']; echo "</td>"; echo "<td>"; echo $row4 ['codmat']; echo "</td>"; echo "<td>"; echo $row4 ['qtdped']; echo "</td>"; echo "<td>"; echo $row4 ['qtdstock']; echo "</td>"; echo "<td>"; echo $row4 ['qtdenc']; echo "</td>"; echo "<td>"; echo $row4 ['coduni']; echo "</td>"; echo "<td>"; echo $row4 ['dimmat']; echo "</td>"; echo "<td>"; echo $row4 ['prazo']; echo "</td>"; echo "</tr>"; } } } echo "</td>"; echo "</table>"; echo "</div>"; } echo "</td>"; echo "</table>"; echo "</div>"; } echo "</td>"; echo "</table>"; echo "</div>"; } } } echo "</tr>"; } } } echo "</table>"; echo "</center>"; echo "</div>"; ?> será que me poderiam ajudar? ja ando à dias com este problema. Muito Obrigada Link to comment Share on other sites More sharing options...
carinacosta Posted April 3, 2012 Author Report Share Posted April 3, 2012 se eu colocar o ultimo select em comentario já nao me aparece os dados depois da tabela, será problemas no select ? Link to comment Share on other sites More sharing options...
fil79 Posted April 3, 2012 Report Share Posted April 3, 2012 Antes de mais valida o HTML :http://validator.w3.org/ Não uses a tag <center>, está absoleta. Usa antes css MCITP-MCTS-MCP Link to comment Share on other sites More sharing options...
scorch Posted April 3, 2012 Report Share Posted April 3, 2012 Carina, já te pedi no outro tópico e volto a dizê-lo, usa o Geshi. Não custa nada, e o post fica mais legível. 😛 PS: Não respondo a perguntas por mensagem que podem ser respondidas no fórum. Link to comment Share on other sites More sharing options...
carinacosta Posted April 3, 2012 Author Report Share Posted April 3, 2012 podia-me explicar essa parte do Geshi? ainda nao percebi muito bem sff Link to comment Share on other sites More sharing options...
scorch Posted April 3, 2012 Report Share Posted April 3, 2012 Vê o link que te dei. Ao colocares código no fórum, mete-o dentro das tags code. 😛 PS: Não respondo a perguntas por mensagem que podem ser respondidas no fórum. Link to comment Share on other sites More sharing options...
carinacosta Posted April 3, 2012 Author Report Share Posted April 3, 2012 Sim ja percebi muito obrigada, Mas podia me ajudar nesta situação? Link to comment Share on other sites More sharing options...
fil79 Posted April 3, 2012 Report Share Posted April 3, 2012 para saber se se trata de um td ou div que não foi fechado é necessário validar o código, como referi. Já o fizeste? MCITP-MCTS-MCP Link to comment Share on other sites More sharing options...
carinacosta Posted April 3, 2012 Author Report Share Posted April 3, 2012 Dá me erro ao validar Link to comment Share on other sites More sharing options...
fil79 Posted April 3, 2012 Report Share Posted April 3, 2012 qual erro? Estás a validar online já com um dominio próprio, certo? MCITP-MCTS-MCP Link to comment Share on other sites More sharing options...
carinacosta Posted April 3, 2012 Author Report Share Posted April 3, 2012 Nao sei se estou a validar da forma mais correcta, nunca o fiz. Valido atraves do URL, do File upload ou Direct Input? Link to comment Share on other sites More sharing options...
carinacosta Posted April 3, 2012 Author Report Share Posted April 3, 2012 Pois o problema é que isto ainda nao está Online Link to comment Share on other sites More sharing options...
scorch Posted April 3, 2012 Report Share Posted April 3, 2012 Direct Input, e depois copias para lá o HTML. 😛 PS: Não respondo a perguntas por mensagem que podem ser respondidas no fórum. Link to comment Share on other sites More sharing options...
carinacosta Posted April 3, 2012 Author Report Share Posted April 3, 2012 Pois mas isto ainda nao está online. Posso pedir uma opinião? Link to comment Share on other sites More sharing options...
fil79 Posted April 3, 2012 Report Share Posted April 3, 2012 copia para aqui o html gerado pelo webserver e valida http://validator.w3.org/#validate_by_input MCITP-MCTS-MCP Link to comment Share on other sites More sharing options...
carinacosta Posted April 3, 2012 Author Report Share Posted April 3, 2012 Result: 1 Error, 1 warning(s) Link to comment Share on other sites More sharing options...
fil79 Posted April 3, 2012 Report Share Posted April 3, 2012 qual o erro? MCITP-MCTS-MCP Link to comment Share on other sites More sharing options...
carinacosta Posted April 3, 2012 Author Report Share Posted April 3, 2012 Não especifica o erro, só aparece isto: Error found while checking this document as XHTML 1.0 Transitional! Line 7, Column 74: end tag for "link" omitted, but OMITTAG NO was specified <link rel="stylesheet" type="text/css" href="../Unnamed Site 3/css.css"> ✉ You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">". Link to comment Share on other sites More sharing options...
fil79 Posted April 3, 2012 Report Share Posted April 3, 2012 Tem de aparecer o erro mais abaixo- Scroll sendo xhtml a tag deve ser fechada "/>": <link rel="stylesheet" type="text/css" href="../Unnamed Site 3/css.css" /> MCITP-MCTS-MCP Link to comment Share on other sites More sharing options...
carinacosta Posted April 3, 2012 Author Report Share Posted April 3, 2012 ja alterei, e agora nao dá nenhum erro no validar. Mas os dados debaixo da tabela todos desordenados aparecem namesma. se fosse div´s o validar tambem detetava certo? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now