n1concepts Posted December 28, 2011 Share Posted December 28, 2011 Hi, I'm working with a PHP script but have a pop - using JS - to open a new form to which I need to insert a variable to that URL but not sure how to accomplish. Here's the current code which works but without the append variable: <?php $_REQUEST[cid] = 123; echo "<strong><A href=# onclick=\"window.open(http://domain.com/email.php?caseid=$_REQUEST[cid]);\">Send a Email</A></strong>"; ?> What I need is for the popup page - which is http://domain.com/email.php to include that variable 'caseid' which should be 123. I can't define the correct logic to produce the correct results - including the variable. Any help w/this appreciated - thx! Link to comment https://forums.phpfreaks.com/topic/253960-need-to-append-variables-to-url-assigned-in-js/ Share on other sites More sharing options...
Zane Posted December 28, 2011 Share Posted December 28, 2011 you need quotes for associative keys. $_REQUEST['cid'] Link to comment https://forums.phpfreaks.com/topic/253960-need-to-append-variables-to-url-assigned-in-js/#findComment-1301885 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.