Jump to content

Passing Data between pages without using the address bar


Comdemned

Recommended Posts

Hi all,

 

I would like to know how to pass data between pages within the same site without using the address bar.

At the moment I have very long URL's.

 

Currently I am using the index.php?option=option&client_id=client_id&this=this&that=that etc.

Then on the other page Im using the %_GET['option'] method.

 

I want to be able to just use index.php (or index.php?option=option) and have the rest of the data sent in the background with out the information being displayed in the address bar.

 

Thanks

Murray

 

Link to comment
Share on other sites

Sessions will work

 

$_SESSION['option'] = "something";

$_SESSION['clientid'] = "clientid";

$_SESSION['this'] = "this";

 

an on the page you want to call it just put

 

$_SESSION['option'];

 

as in

 

echo $_SESSION['option'];

Link to comment
Share on other sites

What are you trying to hide?

 

The quesy string is meant for passing parameters.

 

Solutions depend on what your trying to achieve here, for instance, if you don't like ?&section=news&seq=6

 

Then you should look into URL re-writing, you can use the PATH_INFO server variable for url shortening.

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.