whitewolf007 Posted November 6, 2006 Share Posted November 6, 2006 Jeeze man i have tried snippets of code from different places and books etcI just want to display a table of data from my database in an html tableI can connect to db, select db, query dbNow I need it to loop through each row and print the info there. Nothing I try seems to be working rightThis has got to be about the most common thing ppl do with PHP and mySQL sigh...... ??? Quote Link to comment Share on other sites More sharing options...
Skatecrazy1 Posted November 6, 2006 Share Posted November 6, 2006 once you have the query in a variable like say, $rs, do this:[code]<?phpwhile($row = mysql_fetch_array($rs)){ $msg .= "the format for each individual row's data here"; $msg .= "using the array we just called like so"; $msg .= "Comment Posted by ".$row['name']; $msg .= "or whatever column name you're using, for whatever";}//after you've done that just echo $msgecho $msg;?>[/code] Quote Link to comment Share on other sites More sharing options...
jsladek Posted November 9, 2006 Share Posted November 9, 2006 Hello whitewolf007,If you really get stuck try out my program, it's FREE!!! and EASY!!! (My Opinion)http://www.iobe.net/proj/index.php?pg=downloadsI've been working on this program and am Dying to get someone to try it. Hell, If you don't want to try it. Give me the SQL to create you table and I'll give you the code it generates that will not only display the data but also insert, update, and delete it.Regards,John Sladek Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.