Tables Surounding Php/mysql

admin

Administrator
Staff member
ok, I did a search on TCH for "tables and mysql" but found nothing. Anyway, making progress with my project. I have a mysql/php page presenting correct results <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br /><br />But I want to incorporate tables on my page and create columns and rows for the info. I tried to put my code within a table and I get a blank page.<br /><br />What am I missing? What are the rules with using tables and php/mysql?<br /><br />Thanks!<!--content-->
Putting PHP code into a table shouldnt cause an issue. It kind of depends on what you are trying to accomplish. Can you give us an example to look at?<!--content-->
Example:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><table><br /><?<br />while($datareturn - mysql_row($databack))<br />{<br />$1 = $datareturn[0];<br />$2 = $datareturn[1];<br />echo "<tr><td>$1</td><td>$2</td></tr>";<br />}<br />?><br /></table><!--c2--></div><!--ec2--><!--content-->
Thanks guys. I think Robert has it. Let me explain. User logs on and sees homepage, where there is a menu on left side, banner ads up top. User clicks on "button 1" on left menu, the hyperlink passes "1" to my php page which returns results, but I want the results to be presented within a page with the same layout as homepage (left menu, banner on top, etc) so, to the user, nothing has changed layout wise, just that now there is new info in body of page- layout remaining the same.<br /><br />Makes sense? Let me go home tonight and play around and re-post. <br /><br />Thanks!<br /><br /><br />*9 hours later, biz day ends*<br /><br />You know I put the code inside a <td></td> of a table and the <a href="http://www.couponpile.com/Greg_couponpile_2.php?cid=1" target="_blank">page is blank</a>, but when I view source I can see the correct results.<!--content-->
 
Back
Top