I thought this would be something I could easily look up, but I couldn't find anything useful on google or the search here.
I have a few select boxes, and a submit button. I have a query working for when the user hits the submit button and it sends a few variables, but I need it to also send what the user has selected in the boxes.
if ($Sign_up)
{
$query = "INSERT INTO phpbb_operations_users (operation_id, user_id, username, user_role, user_weapon, user_squad, user_platoon, user_company) VALUES ('$op_id', '$user_id', '$username')"; //missing values for select boxes
$result = $db->sql_query($query) or die(print_r($db->sql_error(),true));
}
Here's one of the select boxes you can use to give me an example of how I can get the value of the select box into a variable:
<select name="Weapons">
<option value="Rifleman"> Rifleman </option>
<option value="SMG"> SMG </option>
<option value="Sapper"> Sapper </option>
<option value="Grenadier"> Grenadier </option>
<option value="Pak36"> Pak36 </option>
<option value="Flak36"> Flak36 </option>
<option value="Opel"> Opel </option>
<option value="Halftrack"> Halftrack </option>
</select>
Thanks