I am a php newbie and i am trying to create a price range system for my ecommerce website project.
so I did a checkbox form:
I implemented the submission of multiple checkbox value by using php as follows. It works perfectly for me and hope that it will work for everyone .
";
$apple=NULL;
if(!empty($_POST['apple']))
$apple = $_POST['apple'];
$_SESSION["apple"] = $apple;
$apple1 = $_SESSION["apple"];
echo $apple1."
";
$low=NULL;
if(!empty($_POST['low']))
$low = $_POST['low'];
$_SESSION["low"] = $low;
$low1 = $_SESSION["low"];
echo $low1."
";
?>
Checkbox
Here I use session variable so that once I checked Samsung it will persist even if I checked apple . Hope this example will help you.