mysql_connect("mysql12.streamline.net", "somerville", "s131099") or die(mysql_error());
mysql_select_db("somerville") or die(mysql_error());
?>
function addCommentIfAddingComment()
{
if (isset($_REQUEST['Action']))
{
if (trim($_REQUEST['Action']) == "AddComment")
{
$result = mysql_query("SELECT MAX(Number) AS theMax FROM tblSciEngSocComments");
$row = mysql_fetch_array( $result );
$nextNumber = (int)$row['theMax']+1;
$result = mysql_query("SELECT * FROM tblSciEngSocPassword");
$row = mysql_fetch_array( $result );
if ($_POST['password'] == $row['Password'])
{
$strFrom = $_POST['from'];
$strServerTime = date("D d F Y H:i:s");
$strLocation = $_POST['location'];
$strComments = $_POST['comments'];
$strQuery = "INSERT INTO tblSciEngSocComments (Number, Name, ServerTime, Location, Comments) VALUES (" . $nextNumber . ",'" . $strFrom . "', '" .$strServerTime . "', '" . $strLocation . "','" . $strComments . "')";
mysql_query($strQuery);
}
}
}
}
?>
|
|
 |
[The Scientific & Engineering Society of EMI Sports & Social Club, Wells]
|
|
|
|
|
Guestbook
|
|
Want to join? Got some suggestions? Here's a hotline straight to the committee!
|
|
|
|
|
|
Guestbook
|
|
Please feel free to add an entry to the guestbook.
|
|
|
|