Jump to content

Help Figuring Out. Weigh In Please!


Trium918

Recommended Posts

Could someone please explain what is the ending

string in the address below after the .php extension.

 

When to use it and why?

 

<?php 
/*What is this:*/  ?
/*What is this:*/  sid
/*What is this:*/  =
/*What is this:*/  6a2233928b657bb42917d2153b9bbd89
?>

http://www.example.com/signup.php?sid=6a2233928b657bb42917d2153b9bbd89

Link to comment
https://forums.phpfreaks.com/topic/49878-help-figuring-out-weigh-in-please/
Share on other sites

The ? usually signifies the beginning of the $_GET array (client side).

 

The $_GET array and the $_POST array are used to gather data from the client (and $_COOKIE, but it's used differently).  In the case of this url, it's passing what looks like a session id in the url....

You would access that value via

$_GET['sid']

 

Read up on the GET superglobal for more info.

 

Also, if it was a question about why the SID is there.... It could be used because the users cookies could be disabled, and cookies are what session ids are normally stored in.

Also, if it was a question about why the SID is there.... It could be used because the users cookies could be disabled, and cookies are what session ids are normally stored in.

 

This would mean that cookies are disabled on the client side;

therefore, it is passed through the url from page to page, correct?

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.