NYCPHP Meetup

NYPHP.org

[nycphp-talk] passing variable when location.href='target.php'

Michael Turk mturk2k at hotmail.com
Mon Apr 5 16:14:51 EDT 2010












Hi John,

What about adding the variable to the url you are using in your js location.href call?

location.href='target.php?myKey=myVal'

Then you can access the variable on target.php using php's $_GET array: $_GET['myKey']

Does that help or did I misunderstand your question?

> From: john.b.williams at gmail.com
> Date: Mon, 5 Apr 2010 16:01:36 -0400
> To: talk at lists.nyphp.org
> Subject: [nycphp-talk] passing variable when location.href='target.php'
> 
> Thank you in advance for your response(s):
> 
> Is there way to pass a variable to browser through php,
> when redirecting output using location.href='target.php'
> _______________________________________________
> New York PHP Users Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
> 
> http://www.nyphp.org/Show-Participation
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20100405/ef8ad6ee/attachment.html>


More information about the talk mailing list