Jump to content
mickeymouse

Passing Paramater via PHP call

Recommended Posts

How do I pass a parameter (myparam) to the page I'm calling via a function.

function ancesterF(myparam)
{location.href=\"FT_Search2.php\";return false;
window.open(location.href); return false;}

Tks
 

Share this post


Link to post
Share on other sites

Thank you dsonesuk.

I should also have asked you how do I capture the param in my called page.

 

Edited by mickeymouse

Share this post


Link to post
Share on other sites

I tried that but I end up with the value of my $getmyparam being equal to "myparam" instead of the value passed which in my  test case is "10006"

In my calling function, I confirm the value of "myparam" and it is "10006".

CALLING CODE:

function ancesterF(myparam)
{alert(myparam);  <----------------------------------------------------------------------------------This confirms the value "10006"
location.href='FT_Search2.php?param=myparam';return false;
window.open(location.href); return false;}

 

RECIEVING CODE:

$getmyparam =$_GET['param'];

print("getmyparam");  <------------------------------- Result = "myparam"  not "10006"

 

Share this post


Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...

×
×
  • Create New...