<?php
// connect to the database.
include("config_mysql.php");
//select table to get info from
$query = mysql_query ("SELECT firstname, lastname, post FROM submittosite ORDER BY id");
or die("Database error. Please contact admin");
while($shout = mysql_fetch_array($query))
{
echo ".".$shout['post'] ." " .$shout['firstname'] ." ".$shout['lastname']".";
}
?>
[/php]
Ok, for some reason I can’t seem to get this to display anything from the database. I know I have stuff stored in this table because I submited something into it from my form here. So not to sure what I did wrong there.
That code seemed to work nicely. Though didn’t come much use to me as I’m just scripting it for the pratices. I’m moving onto the session function now. This seems to have a bit more to it then others.