Holy crap what a long thread.
Anyway, wouldn't using cookies be so much easier?
php.net/setcookie
how to keep a submitted $variable alive over multiple pages
Moderator: General Moderators
- Marco van Wijngaarden
- Forum Commoner
- Posts: 59
- Joined: Mon Jul 07, 2003 6:48 am
- Location: The Netherlands
i don't have anything running myself with this host, i found out too late that this host wasn't running the latest php version actually, so now i am kinda stuck with them! Anyway, it's a Windows 2000 hosting account, they have asp as their priority i guess... i want to look into setting up an Access DB, but then again... i am new to all this... so i want to get this going before i go any further...
But what's your point asking?
But what's your point asking?
- Marco van Wijngaarden
- Forum Commoner
- Posts: 59
- Joined: Mon Jul 07, 2003 6:48 am
- Location: The Netherlands
Something came to my mind, i don't understand the way session works exactly, even after reading all the stuff over and over...but this is what came to me:
Now i open my page like this:
then, depending on the switch, the script will continue with session_register here (for example):
Now, first of all, why should i name these sessions differently in every step since i am referring to session variables all over the page as if they are global, but i've registered sessions with 8 different names in the end...
so shouldn't i refer to those different sessionnames in order to get my variable values?
But basicly, my theory is more like: i need to update (or add new variables to) the session instead of registerring a different one, right?
I assume this is the base of my current trouble??!!
I prefer to work as secure as possible, so globals (for security reasons) and cookies (for reliability) are better not to be used i guess?
Now i open my page like this:
Code: Select all
<?php
session_start();
header("Cache-control: private");Code: Select all
session_register('klantgegevens');
startpage();
page1();
break;so shouldn't i refer to those different sessionnames in order to get my variable values?
But basicly, my theory is more like: i need to update (or add new variables to) the session instead of registerring a different one, right?
I assume this is the base of my current trouble??!!
I prefer to work as secure as possible, so globals (for security reasons) and cookies (for reliability) are better not to be used i guess?
Cookies are more secure than sessions if both are in non-secure encryped environments. People may have different opinions but from personal experience I think cookies are so much better. But for your particular case, it doesn't really matter. But the simplicity of cookies should be utilized IMHO.
Especially for a simple task such as this.
btw have you thought about using just post vars to do this? Or just plain send the mail on the 2nd page instead of involving a 3rd?
Especially for a simple task such as this.
btw have you thought about using just post vars to do this? Or just plain send the mail on the 2nd page instead of involving a 3rd?