hi there..
well lets say I do have a multidimensional array of the sort shown below..
Now I do need to pass on the arrays using checkboxes..!! how do I assign single row to each checkbox so that when I onclick it posts the value to the function on the top...
<?php
session_start();
$arraylen=4; // zero based
$i=0;
$allValuesPresent=1;
if (isset($_POST['table'])) {
foreach ($_POST['table'] as $arr) {
if (! isset($arr[$i])) {
$allValuesPresent = 0;
break;
}
// Will get overwritten by query if any are missing
$qresult[$i]=$arr;
$i++;
}
// return array of results
// do your query
echo $qresult[0][1];
}
?>
<html>
<form method="POST" name="myform2" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<?php $table = array(
// array('id','state','lat_hi','long_hi','lat_low','long_low'), //field names
array(1,'andaman',13.59,94,06.73,92.53),
array(2,'AP', 19.87,84.78,12.59,76.45),
array(3,'Gujarat',24.72,74.55,20.15,68.35),
array(4,'kerala' ,12.75,77.37,08.18,74.86),
array(5,'punjab' ,32.46,76.93,29.53,73.87),
);
$_POST['table']= $table; ?>
</form>
</html>