jamkelvl Posted January 30, 2010 Share Posted January 30, 2010 Can you put php in javascript? Something like... <script> function gotosite() { var URL = document.gotoform.shipTo.options[document.gotoform.shipTo.selectedIndex].value; window.location.href = '?billTo='<?php echo $_GET['billTo'] ?>'&shipTo='+encodeURIComponent(URL); } </script> Link to comment https://forums.phpfreaks.com/topic/190382-question/ Share on other sites More sharing options...
jamkelvl Posted January 30, 2010 Author Share Posted January 30, 2010 I do this all the time.. but I never tested the above code, just assumed it didn't work and well.. it works. Thanks for letting me post! Link to comment https://forums.phpfreaks.com/topic/190382-question/#findComment-1004334 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.