eleven0 Posted January 30, 2008 Share Posted January 30, 2008 I need help using $_GET variable. I read some stuff on some sites. But couldn't find anything useful. Can someone tell me what this variable does. I read that you can create pages like /index.php?id=6. How do i use this variable, i'm sure there are a lot of tutorial on this but couldn't find a good one. Link to comment https://forums.phpfreaks.com/topic/88590-how-to-use-_get-need-tutorial/ Share on other sites More sharing options...
pocobueno1388 Posted January 30, 2008 Share Posted January 30, 2008 Here is a good one http://www.tizag.com/phpT/postget.php Link to comment https://forums.phpfreaks.com/topic/88590-how-to-use-_get-need-tutorial/#findComment-453544 Share on other sites More sharing options...
revraz Posted January 30, 2008 Share Posted January 30, 2008 In your example, if you passed a URL with index.php?id=6 inside of index.php you have a line of code $_GET['id'] and that will get the id=6 above and now 6 will be inside of $_GET['id'] Link to comment https://forums.phpfreaks.com/topic/88590-how-to-use-_get-need-tutorial/#findComment-453547 Share on other sites More sharing options...
eleven0 Posted January 30, 2008 Author Share Posted January 30, 2008 Here is a good one http://www.tizag.com/phpT/postget.php I have checked that before, it didn't help much. In your example, if you passed a URL with index.php?id=6 inside of index.php you have a line of code $_GET['id'] and that will get the id=6 above and now 6 will be inside of $_GET['id'] can you explain a bit more? What exactly does it do when you do that? It gets id=6 but where do i define what that id=6 is? Let say that I got 500word paragraph and I want to put up a link that is linked to (index.php?id=6). I wanna show that 500word paragpraph without creating another page. Is this what it does? Or am i just totally wrong? Link to comment https://forums.phpfreaks.com/topic/88590-how-to-use-_get-need-tutorial/#findComment-453577 Share on other sites More sharing options...
trq Posted January 30, 2008 Share Posted January 30, 2008 This example I posted for someone a while ago should give you the idea. Link to comment https://forums.phpfreaks.com/topic/88590-how-to-use-_get-need-tutorial/#findComment-453598 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.