I have a select box which is linked through JS. I'm trying to make it so that the option chosen is essentially saved, so that when 'refresh attendees' is clicked, only the attendees from the selected group get refreshed.
select box
<select name="users" onChange="showYes(this.value); showNo(this.value); showUn(this.value);" style="font-size: 14px; font-family: open-sans,sans-serif; font-weight: 700; line-height: 17px;" id="attactivity">
<option value="">Select Activity</option>
<option value="CMA">CMA</option>
<option value="CM2">CM2</option>
<option value="CMB">CMB</option>
<option value="CPM">CMP</option>
MySQL
$refreshatt = mysql_real_escape_string($_POST['refreshatt']);
$attactivity= mysql_real_escape_string($_POST['attactivity']);
// See if that product name is an identical match to another product in the system
$sql = mysql_query("UPDATE stats SET attend='0' WHERE activity='attactivity'");
header("location: admin-page.php");
exit();
}
?>
Right now, it is not getting anything as attactivity, so no group is being refreshed. Any suggestions?
As a heads-up: I have tried the query stating a group (i.e. CMA, CM2, etc) and the everything works. It seems to be just getting the value of 'attactivity'