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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.