ok one more problem. Since then I added an option to add a on/off/maintenance option to the form. The sql is updating right but if you are to echo the variable it is always set to on? Never seen this happen here is the new code. If you are to execute the code it says there is an error with the form
The Access is set on Maintenance
<?php
require ('Advertise/Home/Form.php');
if (isset($_REQUEST['email']))
{
$email = $_REQUEST['email'] ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;
mail("123", $subject,
$message, "From:" . $email);
echo "Thank you for your service. The requirements for advertising your website will be emailed to "$email" when your email is read and processed. Please <a href='/'>click here</a> to continue.";
}
else if($result == "On")
{
echo "<form method='post' action='' onsubmit='return Form1_Validator(this)' name='Form1'>
From: <input name='email' type='text' readonly='readonly' value='$_SESSION[email]' length='10' /><br />
<input type='hidden' name='subject' value='Home Page Advertisement' type='text'/><br />
<p>Message:</p>
<textarea name='message' rows='15' cols='40'></textarea><br />
<p>*Note: Inappropriate/ Off topic messages will result in a ban.</p>
<p> </p>
<input type='submit' />
</form></font>";
}
else if($result == "Off") {
echo "The advertise form has been taken down temporarily.";
}
else if($result == "Maintenance") {
echo "The advertise form is currently under maintenance. Please check back later.";
}
else {
echo "There is an error with the advertise form. Please contact support.";
}
?>
And Form.php
<?php
require ('config.php');
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
$query = "SELECT Access FROM $advertise_table_name WHERE id = '1'";
$result = mysql_query($query);
?>