Show Source Code


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">


<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Chinese Zodiac Feedback</title>
<link href="ChineseZodiac.css" rel="stylesheet" type="text/css" media="screen, projection" />


</head>


<body>

<center>
<br>
<?php
include("include/inc_controlstructures.php");
?>
<h1 style="text-align: center; margin-top: 100px; "><font color="#FF3300">Chinese Zodiac Feedback</font></h1>


<?php

include ("include/inc_connect.php");
    if (!
$db === FALSE) {    
        
$TableName="zodiacfeedback";
            
$Name stripslashes($_POST['name']);
            
$Comments stripslashes($_POST['comments']);
            if (
stripslashes($_POST['pubdisplay']) == TRUE)
                
$Pubdisplay "Y";
            else
                
$Pubdisplay "N";
            
$SQLstring "SELECT * FROM $TableName WHERE public_message='Y'";
            
$QueryResult=@mysql_query($SQLstring$DBConnect);
            if (
$QueryResult === FALSE)
                echo 
"<p>Unable to execute the query.</p>" "<p>Error code " mysql_errno($DBConnect)    . ": " mysql_error($DBConnect) . "</p>";
            else {
                echo 
"<table width='50%' border='1' align='center'>\n";
                echo 
"<tr><th>Date</th><th>Time</th><th>Sender</th><th>Comments</th></tr>\n";
                while ((
$Row mysql_fetch_row($QueryResult)) != FALSE) {
                    echo 
"<tr><td><font color='#FF3300'>{$Row[0]}</font></td>";
                    echo 
"<td><font color='#FF3300'>{$Row[1]}</font></td>";
                    echo 
"<td><font color='#FF3300'>{$Row[2]}</font></td>";
                    echo 
"<td><font color='#FF3300'>{$Row[3]}</font></td></tr>\n";
                    }
                echo 
"</table><br /><br />";
            }
        
mysql_close($DBConnect);
    }
?>



<FORM><p align='center'><INPUT Type="button" VALUE="Go Back" onClick="history.go(-1);return true;"></p></FORM>

</center>
</body>
</html>