Search the Community
Showing results for tags 'html anchor'.
-
I have a page that contains both a login and registration form. I set the actions on the forms to be index.php#login and index.php#register so that if the form failed, the user would be taken down the form they were just working with. The problem I am running into is that a successful form completion either logs the user in or brings them to a screen letting them know that they need to verify their email and the #login or #register anchor is being included in the next page's URL. So a user visits my /login.php page, successfully logs in to the site, and sees the next page of /page.php#login instead of just /page.php I read though the manual for header() but didn't really see anything relevant to anchors being preserved or how to flush URL information. Is this information being stored somewhere by the browser and I can just purge it from memory? I was able to find this thread on StackOverflow, but my issue here is that I'm not listing the anchor (fragment as they call it) in the redirect. So according to one of the answers, it should get discarded. I've tried structuring the redirect in two different ways to see if anything can be done as well: header('Location: http://example.com/page.php'); header('Location: /page.php'); Any ideas here? Thanks.
- 9 replies
-
- header
- html anchor
-
(and 1 more)
Tagged with: