ainoy31 Posted June 29, 2007 Share Posted June 29, 2007 Here is my scenario: I am passing my variables via the URL from page to page. This is base on dealing with Authorize.Net. However, here is my question. Can I do the following: $x = $_REQUEST['amount']; and then pass the $x via the url to another page like https://xxx.com/natHealing/view_gift.php?x Much appreciation Quote Link to comment Share on other sites More sharing options...
per1os Posted June 29, 2007 Share Posted June 29, 2007 <?php //$x = $_REQUEST['amount']; and then pass the $x via the url to another page like https://xxx.com/natHealing/view_gift.php?x $x = $_REQUEST['amount']; $url = "http://www.site.com/page.php?x=" . url_encode($_REQUEST['amount']); ?> Would work. Quote Link to comment Share on other sites More sharing options...
clanstyles Posted June 29, 2007 Share Posted June 29, 2007 Why do you use url_encode ? Quote Link to comment Share on other sites More sharing options...
per1os Posted June 29, 2007 Share Posted June 29, 2007 It makes variables url friendly, as an & inside $_REQUEST would throw the url off, url_encode encodes them so they can be passed as they need to be passed. Quote Link to comment 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.