ok, I see you're running apache. You should (if you don't already) have a password protected directory. To do this, create a new folder in your website. Then create a file called .htaccess
in this file, place the following code:
Code:
AuthUserFile C:/WAMP/www/news/includes/.htpasswd
AuthName "Access to Admin"
AuthType Basic
require valid-user
Where the AuthUserFile is the location to a password file named .htpasswd
AuthName is the title of the box that comes up.
Then, create a file called .htpasswd in the same directory and add a line for every user-account you want to use in this form:
UserName : password
Username2 : password2
etc...
without the spaces between the colon. (smileys show up if I don't put the spaces.)
Once you have that setup on the (private) folder (NOTE* putting this in the root of your website will deny people access to view the site).
in your private folder, create a new php file and connect to the database as before.
establish the connection, call mysql_select_db on your database, then set query equal to something like this:
Code:
SELECT * FROM [myTableName]
where myTableName is the name of your table.
Next, you have to "iterate" through the result set.
Code:
$rs = mysql_query($query,$conn);
//loop through all the rows returned by the query
while ($row = mysql_fetch_array($rs,MYSQL_ASSOC)) {
echo $row['column_name'] . "<br />\n";
} // end while
format that however you want, probably in a table. $row is an associative array with a number of elements equal to the number of columns you have in your database table.
NOTE: Make sure to close your connection to your database!
[code]
mysql_close($conn);
Hope that helps.