Jump to content

Question about Passing array to another page


abdfahim

Recommended Posts

Oops .. I should add some more details.. I cant possibly use Serialize function because the second php page is called from a javascript. I think I better post some prtion of my code ..

 

<script LANGUAGE="JavaScript">
function myjavascript(){
var strURL = "second_page.php?kpi=" + document.sForm.kpi.value;
//Now I will do some work .. But first I have to pass all the checked value of kpi to second_page.php
}	
</script>

<form name="sForm">
<?php
$myarr=array(.........some elements....);
while($i=0;$i<count($myarr);$i++){            
        echo "<input type=\"checkbox\" name=\"kpi[]\" value=\"".$myarr[$i]."\">".$myarr[$i]."<BR>";
}
?>
<input type="button" onclick="javaScript:myjavascript();" value="Go">
</form>

 

So, I have to pass all the checked elements of the form to second_page.php, from that javascript function. Is that possible?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.