I need to change a few forms on a few sites using php. a snippet is seen below;
The checkbox I need to put under the line
"$message=$_GET['message'];"
Just need the code for a simple tickbox
<?php
if($name) {
$name=$GET['name'];
$email=$GET['email'];
$subject1=$GET['subject'];
$message=$GET['message'];
$ip=$SERVER["REMOTE_ADDR"];
$host = gethostbyaddr($SERVER['REMOTE_ADDR']);
$host = $ip.".".$host;
$mon=date(m);
$day=date(j);
$year=date(y);
$hour=date(g);
$min=date(i);
$sec=date(s);
$hour=$hour-2;
if($hour<=0) { $hour+=12; }
$ts = "$hour:$min:$sec on $mon/$day/$year";
$to="info@bdimedia.com";
$subject="Moab Software Contact Form:"." $subject1";
$body="
Message from: $name
Subject: $subject1
E-mail: $email
Message: $message
Host: $host
Time: $ts";
mail($to, $subject, $body);
echo "<script>location.href=\"http://spekegarston.com\"</script>";
}
?>
<html>
<head>
<title>Contact Us</title>
</head>
<body bgcolor="#FF9900">
<br>
<table width="95%" border="0">
<tr>
<td width="46%"> </td>
<td width="54%">
<form method="get" action="contact.php">
<p><font face="verdana" size="1">Your Name:<br>
<input type="text" name="name" style="border: 1px solid #cccccc; background-color: #ffffff;">
<br>
<br>
Your E-mail Address:<br>
<input type="text" name="email" style="border: 1px solid #cccccc; background-color: #ffffff;">
<br>
<br>
Subject:<br>
<input type="text" name="subject" style="border: 1px solid #cccccc; background-color: #ffffff;">
</font> <font face="verdana" size="1"><br>
<br>
Message:<br>
<font face="Verdana, Arial, Helvetica, sans-serif">
<textarea name="message" cols="40" rows="10" style="border: 1px solid #cccccc; background-color: #ffffff;"></textarea>
</font></font></p>
<br>
<br>
<br>
<br>
</font></p>
<p><font face="verdana" size="1"><br>
<br>
<input type="submit" value="send" style="border: 1px solid #cccccc; background-color: #ffffff;" name="submit">
</font> </p>
</form>
<font face="verdana" size="1"><br>
</font></td>
</tr>
</table>
<br>
<br>
<br>
<br>
<br>
<font face="verdana" size="1">
<form method="get" action="contact.php">
<br>
</form>
</font>
</body>
</html>
Basically I need to attach a checkbox and am struggling terribly trying to get the code right...................Please go easy on me !!!
Can anyone help......................pleeeaaaase.
Mark