ianhaney Posted April 16, 2012 Share Posted April 16, 2012 I have got connection to the the mysql database, how do I get the data from the database to display on the webpage Quote Link to comment https://forums.phpfreaks.com/topic/261046-how-to-display-data-from-the-mysql-database-to-my-webpage/ Share on other sites More sharing options...
marcus Posted April 16, 2012 Share Posted April 16, 2012 Select the data $data = mysql_query("SELECT * FROM table"); while($row = mysql_fetch_assoc($data){ // use $row as an array to access individual columns and their respective data } here you go Quote Link to comment https://forums.phpfreaks.com/topic/261046-how-to-display-data-from-the-mysql-database-to-my-webpage/#findComment-1337854 Share on other sites More sharing options...
batwimp Posted April 16, 2012 Share Posted April 16, 2012 You should keep replying to your original thread instead of starting a new post. Quote Link to comment https://forums.phpfreaks.com/topic/261046-how-to-display-data-from-the-mysql-database-to-my-webpage/#findComment-1337855 Share on other sites More sharing options...
ianhaney Posted April 16, 2012 Author Share Posted April 16, 2012 Hi Sorry Batwimp, is it ok to keep replying, if not I will stick to replying on the original post Quote Link to comment https://forums.phpfreaks.com/topic/261046-how-to-display-data-from-the-mysql-database-to-my-webpage/#findComment-1337866 Share on other sites More sharing options...
batwimp Posted April 16, 2012 Share Posted April 16, 2012 If this is the same subject as your original post (using the same code), keep replying to the original post. That way people can read the older posts in that thread and know what you are talking about and it will be easier for people to answer your questions. Post your updated code, too, if you've implemented the above code, and remember to wrap your code in code tags. This keeps the front page unclogged with multiple posts and really lets people help you better when they can read the entire problem from beginning to end. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/261046-how-to-display-data-from-the-mysql-database-to-my-webpage/#findComment-1337868 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.