Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 136,052 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,554 people online right now. Registration is fast and FREE... Join Now!




Passing Variables

 
Reply to this topicStart new topic

Passing Variables

fyrestorm
13 Nov, 2002 - 01:46 PM
Post #1

D.I.C Lover
Group Icon

Joined: 4 Apr, 2002
Posts: 3,103



Thanked: 2 times
Dream Kudos: 228
My Contributions
is there a way to pass variables without them all being in the url?
User is offlineProfile CardPM
+Quote Post

arniie
RE: Passing Variables
13 Nov, 2002 - 02:01 PM
Post #2

D.I.C Addict
****

Joined: 8 Oct, 2002
Posts: 999

yes use hidden fields, or store them in a database, or a file
User is offlineProfile CardPM
+Quote Post

LuxFX
RE: Passing Variables
13 Nov, 2002 - 03:32 PM
Post #3

D.I.C Head
**

Joined: 9 Aug, 2001
Posts: 63

if you use the form method POST instead of GET, then the variables are passed invisibly. It is with GET that you see the variables in the url
User is offlineProfile CardPM
+Quote Post

fyrestorm
RE: Passing Variables
13 Nov, 2002 - 03:35 PM
Post #4

D.I.C Lover
Group Icon

Joined: 4 Apr, 2002
Posts: 3,103



Thanked: 2 times
Dream Kudos: 228
My Contributions
i'm not using a form
User is offlineProfile CardPM
+Quote Post

klewlis
RE: Passing Variables
13 Nov, 2002 - 03:57 PM
Post #5

cur tu me vexas?
*****

Joined: 9 Nov, 2001
Posts: 1,723

you could use session variables.
User is offlineProfile CardPM
+Quote Post

LuxFX
RE: Passing Variables
14 Nov, 2002 - 08:32 AM
Post #6

D.I.C Head
**

Joined: 9 Aug, 2001
Posts: 63

or you could use javascript to save a cookie, which can also be retrieved from your server script
User is offlineProfile CardPM
+Quote Post

skyhawk133
RE: Passing Variables
14 Nov, 2002 - 09:05 AM
Post #7

Head DIC Head
Group Icon

Joined: 17 Mar, 2001
Posts: 14,926



Thanked: 47 times
Dream Kudos: 1650
Expert In: Web Development

My Contributions
Or you could use PHP to make the cookie.
Sessions would be best however.

CODE
·Starting a Session - To start a session use session_start() and to register a variable in this session use the $_SESSION array.

<?php
 session_start();
 $_SESSION['my_var'] = 'Hello World';
?>

User is online!Profile CardPM
+Quote Post

fyrestorm
RE: Passing Variables
15 Nov, 2002 - 01:55 PM
Post #8

D.I.C Lover
Group Icon

Joined: 4 Apr, 2002
Posts: 3,103



Thanked: 2 times
Dream Kudos: 228
My Contributions
it turns out that a little javascript and cookies solved my problem...
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/1/08 05:44PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month