| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| SQLdumpster.com | Need valid XHTML Hey. Firstly, I need pages on my webiste to contain the following link: go.php?id=5&url=http://www.newdomain.com however, it's not valid XHTML. So I've encoded it (which looks horrible and I rather I hadn't but I feel its the only way). And now I cannot decode it. I've used urldecode but it still shows: go.php?id%3D5%26url%3Dhttp%3A%2F%2Fwww.newdomain.c om I tried: PHP Code: go.php/5/http://www.domain.com where 5 is the id and http://www.domain.com is the domain. Thanks
__________________ !!!!!!! see something you like? Accepting offers for great affiliate websites !!!!!!! Free Databases for your Website | All Things Playstation 3 Website Design Books | Music While You Work? | Computer Gadgets Last edited by miseria; 03-30-2006 at 02:19 PM. |
| |
| | #2 (permalink) |
| Domains my Dominion | 1. Make sure you have used urlencode() to generate the link 2. Make sure that the name of the parameter in the URL is the same for both pages 3. In the target page you need something like this to fetch the parameter from the URL: $url=urldecode($_GET['url']); 'url' is a litteral name, remove the $ sign and I guess you should be fine Please note that $_GET['url'] and $url are two different variables actually, here I'm assigning the value of $_GET['url'] to $url in PHP code To generate SEO-friendly URLs like go.php/5/http://www.domain.com you could simply used mod_rewrite for automatic URL rewriting so you don't have to handle this in your code...
__________________ Buy now - MassDeveloper.com $500 |
| |
| | #3 (permalink) |
| SQLdumpster.com | Thanks sdsinc
__________________ !!!!!!! see something you like? Accepting offers for great affiliate websites !!!!!!! Free Databases for your Website | All Things Playstation 3 Website Design Books | Music While You Work? | Computer Gadgets |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |