irn3rd Posted July 12, 2008 Share Posted July 12, 2008 I'm very new to php i only know how to output messages with echo and how to start a php session of at the moment learned a bit about using forms got to go back over that, I'm looking to take the name of the page onto the next page the user clicks. For Example if you are on the home page an you go to a page called 'about me' i want a message on the 'about me' page saying that you have come from the home page. I'm going to check my form tutorials to see if i can figure it out from that, but please help be much appreciated Many Thanks Quote Link to comment Share on other sites More sharing options...
unsider Posted July 12, 2008 Share Posted July 12, 2008 I'm a little confused by your request. Like a little nav-bar? Let's assume you're on the home page, and follow the link the about me page, it would display the following in the nav-bar?... Home > About Me If not, I completely misunderstood you. Quote Link to comment Share on other sites More sharing options...
irn3rd Posted July 12, 2008 Author Share Posted July 12, 2008 Yh I'm sorry about that i find it quite hard to explain things some times, Yh thats pretty much what i want. Sorry once again. Thank again. Quote Link to comment Share on other sites More sharing options...
xtopolis Posted July 12, 2008 Share Posted July 12, 2008 You may be able to look at the global var: $_SERVER['REQUEST_URI']; and from there do some string manipulation to find out what the page was called. $from = $_SERVER['REQUEST_URI']; Although, I'm not sure how this works, I rarely use it. Doing a small search I found this though: http://www.dezinerfolio.com/2008/01/09/back-to-previous-page-php/ You could store the current page in a var, so when you go to the next one you'd know where you were last, if it was in your pages with sessions. Quote Link to comment Share on other sites More sharing options...
irn3rd Posted July 13, 2008 Author Share Posted July 13, 2008 thank you very much this is what i was looking for, sorry my explanation isn't clear I'm new to php and still learning the name for certain things. Sorry about that Ill give that a go and see how it goes. Another question, i have a website where everything is .html except one php page. can i use php code in a file with an extension which isn't php? http://www.irn3rd.co.uk/ Thats my website it's still being developed Thanks alot!! Many Thanks Irn3rd Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted July 13, 2008 Share Posted July 13, 2008 can i use php code in a file with an extension which isn't php? Try. Quote Link to comment Share on other sites More sharing options...
irn3rd Posted July 13, 2008 Author Share Posted July 13, 2008 got it sorted:D thank you very much everyone:) 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.