This is a discussion on Re: [PHP] Passing $Vars between 2 php pages within the PHP General forums, part of the PHP Programming Forums category; |Valentin wrote: | |>Hi, is any way to pass a $Var from one to other php pages without using |>&...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
|Valentin wrote:
| |>Hi, is any way to pass a $Var from one to other php pages without using |><DEFANGED_FORM> and Cookies? |> |>Thanks, |> On Jul 16, 2003, "John Manko" claimed that: |page1.php |$_SESSION['myvars_VARNAME'] = $varname; |the 'myvars_' is just for identification purposes, so avoid over-writing |anthing that you might not want to. | |page2.php |$varname = $_SESSION['myvars_VARNAME']; Session still either use cookies or URI: "There are two methods to propagate a session id: Cookies, URL parameter" Thus sayeth the oracle: http://www.php.net/manual/en/ref.session.php The only way that I can see of passing a variable from page to page without using cookies or URI would be to make sure that only one person can access the entire site at one time and use either a database or a file on the server. Jeff -- Registered Linux user #304026. "lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import" Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED Responses to this message should conform to RFC 1855. |
|
|||
|
why not build a GET QUERY_STRING, save it in a database along with the
session_id, the read it on the second page, parsing the string. Jeff Harris wrote: >|Valentin wrote: >| >|>Hi, is any way to pass a $Var from one to other php pages without using >|><DEFANGED_FORM> and Cookies? >|> >|>Thanks, >|> >On Jul 16, 2003, "John Manko" claimed that: > >|page1.php >|$_SESSION['myvars_VARNAME'] = $varname; >|the 'myvars_' is just for identification purposes, so avoid over-writing >|anthing that you might not want to. >| >|page2.php >|$varname = $_SESSION['myvars_VARNAME']; > >Session still either use cookies or URI: >"There are two methods to propagate a session id: Cookies, URL parameter" > >Thus sayeth the oracle: >http://www.php.net/manual/en/ref.session.php > >The only way that I can see of passing a variable from page to page >without using cookies or URI would be to make sure that only one person >can access the entire site at one time and use either a database or a file >on the server. > >Jeff > > |