Jump to content

How to use $_GET [Need tutorial]


eleven0

Recommended Posts

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

 

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?

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.