Hey, I am wondering how to extract the data from a table in a database onto a table in a page (users.php),
For example:
I want to be able to get all of the usernames and all the id’s from my database onto a table.
So if I have in my database:
1 – Fred
2 – Frank
3 – Margret
It will see that I have them user’s and id’s in the database and print them onto a table.
Any help would be great,
Thanks.
Connect to your database. Host is the location, like
localhostif its on your computer, or on the same server as your code. User and Password are self explanatory.The name of the database you want to access.
The actual mysql query.
Sort it into an array
Turn the array into a table. (You could skip the last step and go right to this one.
Or, the formatting you wanted