Hello all,
I want to pass a url from one page to another and simply want to know if I can urlencode() an entire url. I've done some searching on the net and some say not to do so.(I'm pretty sure it actually is okay....)
So let's say I want to pass page1.php's URI to page2.php.
Using $_SERVER['REQUEST_URI'] I get page1.php's URI as seen below:
/people/profiles/profiles.php?pageNum_rs_profiles=1&totalRows_rs_profiles=13&searchInfo=johnny&do_search=Find
If I want to pass the above URI to page2.php, is this the proper way to do so?(Using urlencode to encode the entire above URI...)
<a href="http://www.domain.com/page2.php?returnto=<?php echo urlencode($_SERVER['REQUEST_URI']); ?>">Link Text</a>
Would this also work fine for a complete URI such as:
http://www.domain.com/people/profiles/profiles.php?pageNum_rs_profiles=1&totalRows_rs_profiles=13&searchInfo=johnny&do_search=Find
Thanks as always!
Peter