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! Link to comment https://forums.phpfreaks.com/topic/143966-how-to-make-this-kind-of-link/ Share on other sites More sharing options...
DeanWhitehouse Posted February 5, 2009 Share Posted February 5, 2009 Look into $_GET Link to comment https://forums.phpfreaks.com/topic/143966-how-to-make-this-kind-of-link/#findComment-755433 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. Link to comment https://forums.phpfreaks.com/topic/143966-how-to-make-this-kind-of-link/#findComment-755434 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? Link to comment https://forums.phpfreaks.com/topic/143966-how-to-make-this-kind-of-link/#findComment-755565 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 Link to comment https://forums.phpfreaks.com/topic/143966-how-to-make-this-kind-of-link/#findComment-755574 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? Link to comment https://forums.phpfreaks.com/topic/143966-how-to-make-this-kind-of-link/#findComment-755642 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. Link to comment https://forums.phpfreaks.com/topic/143966-how-to-make-this-kind-of-link/#findComment-755648 Share on other sites More sharing options...
Miku Posted February 6, 2009 Author Share Posted February 6, 2009 full noob i dont get it.... Link to comment https://forums.phpfreaks.com/topic/143966-how-to-make-this-kind-of-link/#findComment-755657 Share on other sites More sharing options...
Miku Posted February 8, 2009 Author Share Posted February 8, 2009 bump.... Link to comment https://forums.phpfreaks.com/topic/143966-how-to-make-this-kind-of-link/#findComment-757640 Share on other sites More sharing options...
trq Posted February 8, 2009 Share Posted February 8, 2009 This thread should help you out. Link to comment https://forums.phpfreaks.com/topic/143966-how-to-make-this-kind-of-link/#findComment-757652 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.