Hi i want the values which are selected should be stored in a session. here i have stored all the values which are available how to do it.......pls give me solution.............
<?php
include('database.php');
$stype=$_POST['category'];
if($stype=="service_category")
{
$result = mysql_query("SELECT * FROM service_category ");
while($row = mysql_fetch_array($result))
{
?><input type="Checkbox" name="a[]" id="a[]" value="servicec"><?echo $row['servicec'];
echo "<br />";
$a[$i]=$row['servicec'];
$i++;
$_SESSION['a1']=$a[i];
// echo $_SESSION['a1'];
}
$_SESSION['a1']=$a;
}