i am trying to set session variable using a form but i ahve never done this before and i am unsure of how this is done. i have had a look at a few examples on line but still i am not clear on how this works.
here is what i have up to now to register the variables
<?php
session_start();
$_SESSION["dropdown"];
$_SESSION["radio"];
$_SESSION["dropdown2"];
$_SESSION["radio2"];
?>
i have a form on the page which has different form elements which are named dropdown, radio etc. if i want it to record what choices the user has made on the form will this work.
if i want to use these on the next page would i write something like this
<?php
session_start();
$_SESSION["dropdown"] = $db;
$_SESSION["radio"] = $table;
$_SESSION["dropdown2"] = $db2;
$_SESSION["radio2"] = $table2;
?>
would $db be set to the value taken from the form?