.
in my project i have two pages , first page has a form (check-boxes) , and the second page will print the values of the checked boxes when i click submit/print button .
if( isset($_POST['do']))
{
$mid = $_POST['mid'];
}
once i click the " do button " in the first page , i go to the second page , then take the checked box values by $_POST['mid']
and when i click on the print button it should print the values of the checked box
if(isset($_POST['print']))
{
foreach($mid as $values)
echo $values;
}
but it gives me :
Undefined variable: mid ., and Invalid argument supplied for foreach()
notice that it works when i put the foreach statement in the first -if- : if( isset($_POST['do'])) , but i dont want it be like that.
and thank you all