seaweed Posted March 12, 2009 Share Posted March 12, 2009 After executing a script I want to re-route the user back to the page they were on, but jump down to a specific part of the page. What is the syntax to add an anchor to the end of a php url? Right now I have: header("Location: project.php); exit; Basically I want it to be: header("Location: project.php#$panel"); exit; where $panel is the specific part of the page they were on. The page uses anchor tags like <div id="part1"> etc. Quote Link to comment Share on other sites More sharing options...
jackpf Posted March 12, 2009 Share Posted March 12, 2009 header("Location: project.php#$panel"); exit; Why would that not work? Quote Link to comment Share on other sites More sharing options...
seaweed Posted March 12, 2009 Author Share Posted March 12, 2009 I don't know but it doesn't but this does $url = "project.php#" . $p; // Routes to project header("Location: $url"); exit; Quote Link to comment Share on other sites More sharing options...
seaweed Posted March 12, 2009 Author Share Posted March 12, 2009 Sorry... $p = $_GET['p']; came from ther page they were on and is the section they were at. How do I mark topics solved here, there's no edit post option :-\ Quote Link to comment Share on other sites More sharing options...
jackpf Posted March 12, 2009 Share Posted March 12, 2009 Well, I see you got it working and you found the topic solved link. Great success 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.