Is thier a special way to get a check form to work? I have built a form that have checkboxes in it. Now everything in the form workins and submits to the DB properly except the actually checks. now I have a checkbox that says other and then a text box attached to it, if you type text in it it works, but the checkboxes don't. So I am not sure what I am doing wrong. Here is the php script for below and the link to it so you can see how the manner in how the boxes are being used.
http://www.texascampingforum.com/2006/index.php?page=submit
<?
include("dbinfo.inc.php");
$str_type = $_POST['type'];
$str_type = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_type);
$str_name = $_POST['name'];
$str_name = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_name);
$str_city = $_POST['city'];
$str_city = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_city);
$str_activities = $_POST['activities'];
$str_activities = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_activities);
$str_URL = $_POST['URL'];
$str_URL = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_URL);
$str_description = $_POST['description'];
$str_description = preg_replace("#\<.+?\>(.+?)\</.+?\>#is", "\\1", $str_description);
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query = mysql_query("INSERT INTO parks (type, name, city, activities, URL, description)
VALUES ('$str_type','$str_name','$str_city','$str_activities','$str_URL','$str_description')")or die (mysql_error());
mysql_close();
?>
here are the checkboxes.
<FORM METHOD="POST" ACTION="?page=includes/submit">
<p><INPUT TYPE="checkbox" NAME="activities"
VALUE="Camping"</font></span><font size="2"> Camping </font>
<INPUT TYPE="checkbox" NAME="activities"
VALUE="RV's"</font></span><font size="2"> RVing </font>
<INPUT TYPE="checkbox" NAME="activities"
VALUE="Hiking"</font></span><font size="2"> Hiking </font>
<INPUT TYPE="checkbox" NAME="activities"
VALUE="Boating"</font></span><font size="2"> Boating </font>
<INPUT TYPE="checkbox" NAME="activities"
VALUE="Fishing"</font></span><font size="2"> Fishing </font>
<INPUT TYPE="checkbox" NAME="activities"
VALUE="Hunting"</font></span><font size="2"> Hunting </font>
<INPUT TYPE="checkbox" NAME="activities"
VALUE="Wildlife"</font></span><font size="2"> Wildlife Watching </font>
<INPUT TYPE="checkbox" NAME="activities"
VALUE="picnic/playground"</font></span><font size="2"> Picnic Areas/Playground </font><INPUT TYPE="checkbox" NAME="activities"
VALUE="geocaching"</font></span><font size="2"> Geocaching </font><INPUT TYPE="checkbox" NAME="activities"
VALUE="Other"</font></span><font size="2"> Other, please explain: </font><INPUT TYPE="text" NAME="activities" SIZE="19">
-Thanks in advance for any help or suggestions.