Bluehost.com Web Hosting $6.95

Re: [PHP] Passing $Vars between 2 php pages

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 |>&...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-17-2003
Jeff Harris
 
Posts: n/a
Default Re: [PHP] Passing $Vars between 2 php pages

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


Reply With Quote
  #2 (permalink)  
Old 07-17-2003
John Manko
 
Posts: n/a
Default Re: [PHP] Passing $Vars between 2 php pages

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



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 07:33 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0