bradym.net

Random thoughts of a Code Monkey
  • Home
  • About Me
  • JavaScript
  • Misc
  • MySQL
  • PHP
  • Windows
Home > PHP > Opera friendly PHP redirect

Opera friendly PHP redirect

January 2nd, 2008 Leave a comment Go to comments

Opera can’t handle a redirect to a URL that ends in an anchor. I found this out trying to use the PHP header() function.

From what little I was able to find using Google on the topic, it appears that Opera won’t redirect a user to the page they just came from, it must be a different URI.

To get around this in php, here’s what I did:

header('Location: file.php?value1=12&value2=43&r='.rand().'#anchorName');

Having the random number from rand() makes the page unique, and the redirect works as expected.

Categories: PHP Tags: Opera, PHP
Comments (0) Leave a comment
  1. No comments yet.
Subscribe to comments feed

Making the Windows Command Prompt Usable Can’t get JCalendar to select a specific date when opening
Top
Copyright © 2008-2009 bradym.net