Miku Posted February 5, 2009 Share Posted February 5, 2009 Hi, i seen site with http://www.name.com/something/?p=45 <-- when you click on this it will send you to a page but how dose that work? since i wish to use something like that on my site.... and is there any way to make links in php? instead of <a href="#">TEXT</a> since then users will not be able to get to pages but just viewing the source code... Thank You! Quote Link to comment Share on other sites More sharing options...
DeanWhitehouse Posted February 5, 2009 Share Posted February 5, 2009 Look into $_GET Quote Link to comment Share on other sites More sharing options...
premiso Posted February 5, 2009 Share Posted February 5, 2009 Basically the index.php inside of "something" folder has code in it that checks if p issset in $_GET data, then probably a case/switch statement it determines what to display. No, links have to follow the standard HTML format. Quote Link to comment Share on other sites More sharing options...
Miku Posted February 6, 2009 Author Share Posted February 6, 2009 so something like this <body> <?php $page = $GET['?->$number']; ?> </body> if i am wrong can you give me the write code? Quote Link to comment Share on other sites More sharing options...
marcus Posted February 6, 2009 Share Posted February 6, 2009 <?php $page = $_GET['p']; echo $page; ?> would give you 45 Quote Link to comment Share on other sites More sharing options...
Miku Posted February 6, 2009 Author Share Posted February 6, 2009 would i have to make a directory on the server called 45? Quote Link to comment Share on other sites More sharing options...
peranha Posted February 6, 2009 Share Posted February 6, 2009 No, 45 would reference something in a database. Quote Link to comment Share on other sites More sharing options...
Miku Posted February 6, 2009 Author Share Posted February 6, 2009 full noob i dont get it.... Quote Link to comment Share on other sites More sharing options...
Miku Posted February 8, 2009 Author Share Posted February 8, 2009 bump.... Quote Link to comment Share on other sites More sharing options...
trq Posted February 8, 2009 Share Posted February 8, 2009 This thread should help you out. 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.