gamesmstr Posted October 15, 2008 Share Posted October 15, 2008 I have a php variable ($id) that I am trying to pass in a url using the javascript window.location function, but it is not working properly. Can I get some help with my formatting? ?> <script> window.location="outlands_move.php?step=up&id=$id" </script> <? Quote Link to comment https://forums.phpfreaks.com/topic/128535-solved-variable-passing-issue/ Share on other sites More sharing options...
dennismonsewicz Posted October 15, 2008 Share Posted October 15, 2008 try this window.location="outlands_move.php?step=up&id=<?php echo $id; ?>" Quote Link to comment https://forums.phpfreaks.com/topic/128535-solved-variable-passing-issue/#findComment-666103 Share on other sites More sharing options...
gamesmstr Posted October 15, 2008 Author Share Posted October 15, 2008 That did it! Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/128535-solved-variable-passing-issue/#findComment-666106 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.