To check which checkbox is selected, or if both are selected, in PHP
checker in php
if (isset($_POST['Submit'])) {
$state=$_POST['coupons'];
foreach ($state as $statename)
{
$x = $statename;
$ugh .= $x;
}
$state=$_POST['coupons'];
foreach ($state as $statename)
{
$x = $statename;
$ugh .= $x;
}
if 1 is selected, result will be 1
if 2 is selected result will be 2
if both are selected, result will be 12
go forward using if($ugh == ‘12′){ } etc
Categories |
||||
No Comments to “Check for checkbox’s [PHP]”
Please Wait
Leave a Reply