Jump to content

Reg. url rewriting


new_to_php

Recommended Posts

Hi ,

I am using url rewriting in my php script.

How can I set the variables so that I can access them

in another PHP pages which are referenced by this page ?

 

means .. If we use sessions we can use session variables so that we can access them in another another pages.

how it can be done in url rewriting ??

 

if(version_compare(phpversion(),'4.3.0')>=0) {
    if(!ereg('^SESS[0-9]+$',$_REQUEST['SESSION_NAME'])) {
        $_REQUEST['SESSION_NAME']='SESS'.uniqid('');
    }
    output_add_rewrite_var('SESSION_NAME',$_REQUEST['SESSION_NAME']);
    session_name($_REQUEST['SESSION_NAME']);
}

Link to comment
Share on other sites

Hi ,

I mean to say :

I have a array in Test.php as

 

  $test_array = array();

Contents of that array are set at when you click any button on that page (at run time).

  echo("  <a href=\"$PHP_SELF?page=$i\">CLICK ME</a>");

 

  In Test.php I have link called "CLICK ME" , again it will refer to that same php file , at that

point of time I want to use the array "test_array". I am using the URL rewriting.

how can i get the array in the new page ?

 

Thank you

Link to comment
Share on other sites

Hi ,

  First I started with sessions only.But I have problems with sessions.

In a browser if i open 2 tabs , they share same session. If i make changes in

tab2 then tab1 will also be affected because they sahre same session.

So instead of session i want to go for url rewriting.

Is there any way other than sessions ?

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.