\n";
setup_form ();
hidden_div1();
get_message();
#############################################PHP FUNCTION DECLERATIONS BEGINS #########
# This is function sets up the initial form for argurments to the
# select statment
function setup_form () {
echo "\n";
}
function hidden_div1 ()
{
#=======================Hidden form starts here =============================
echo "
\n";
echo "Enter your message Below:\n";
echo "\n";
echo "
\n";
}
function java_scripts_functions() {
echo <<
RELOAD;
}
function get_message() {
// set server access variables
$host = "localhost";
$user = "ramey";
$pass = "";
$db = "nmdb";
// open connection to database
$connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!");
// select database to use
mysql_select_db($db) or die ("Unable to select database!");
// create SQL query string
$query = "SELECT username, hostid, rowid FROM cmdlog
WHERE username = 'rmuforo'";
// execute query and obtain result set
$result = mysql_query($query) or die ("Error in query: $query. "
. mysql_error());
// are there any rows in the result?
if (mysql_num_rows($result) > 0)
{
// yes
// iterate through result set
// format query results as table
echo "