|
#1
|
|||
|
|||
|
Session Overview
When User visit your website, a web session has been created. PHP Session Management Allow you to track/manipulate User Data during this web session. Points To Remember
Starting a Session You can start PHP Session by following statement, at the start of PHP Page. PHP Code:
Storing Session Variables You can store Session variables in Associative Array $_SESSION, Let see it By Example PHP Code:
1. Starting the session 2. Reteriving the Session Variable "views", and assign the value to local variable 3. Print the Statement to Browser 4. Modify the "views" session variable and assign a new value. So Every time user will visit the page (in current session) it increments it page view, and thus tell him/her that how many times he visited the page. Destroy Session Although Session is created for Temporary Period, and destroy itself when user end its web session. But in few cases you needed to destroy session, "Logout" is good example of destroying session. Or Timeout. You Can Destroy Session just be simple one function call PHP Code:
php_mail1.php PHP Code:
We will gather Subject and Message Form Parameters. PHP Code:
PHP Code:
__________________
![]() |
|
#2
|
|||
|
|||
|
I'm getting a "Invalid Parameters" from php_email3.php. Don't you have to pass the SID in the query string to the downstream pages?
BTW, I had to change the line: if($_POST['submit']) to: if(!$_POST['submit']) in both php_email1.php and php_email2.php. Thanks. \cbf |
|
#3
|
|||
|
|||
|
Hi CBF
Thanks for mentioning it, It was my mistake Kindly Change in php_mail2.php Notice submit box name is submit2 PHP Code:
As you can see in the php_mail1.php and php_mail2.php, the Submit name was unique "submit" therefore script php_mail2.php halt in the same block, as I have changed the submit name to "submit2", so this time when you submit the form there would be no such $_POST['submit'], and php switch to second block and redirect you third page, I hope you understand now.
__________________
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|