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
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?

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.