|
|||||||
| PHP Discussion and technical support for using and deploying PHP based websites. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello i have problem my session variables seem to disapear as i go along i've created this code to ilustrate whats happening
First off i just post 3 detials like a name a age and a favourite number. that in turn goes to the next page where its being picked up by the php code and put into the Global Variable. the page uses the variables with no problem and you can select a link to go onto the next page where the number is being reworked using simple maths. and so it goes on when it comes to the last page it concats all the variables into a single global varible and send back to the 2nd page where it displays the all the numbers. but my posted values dispears at this stage. and if you run the same procedure again it shows the values is nothing and the number value is 0. Could some one please assist me in helping me retain these values. i think when i load the 2nd page again it creates either a new session ID or just loses the info completely cause the values are being reasigned in that page. Here is the code.... Start.php PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
Thanks |
|
#2
|
|||
|
|||
|
Im not sure if this is really the problem but try this one.
in every file move the PHP Code:
hope this will work. |
|
#3
|
|||
|
|||
|
Quote:
Its like its trying to get the post from start.php but since that executed and moved onto the next page those values are lost and cant be recalled. so i need something that will be able to refer back to a previous page and retain the values. |
|
#4
|
|||
|
|||
|
try adding
PHP Code:
|
|
#5
|
|||
|
|||
|
thanks i'll try that
|
|
#6
|
|||
|
|||
|
Quote:
Thanks alot that help loads i doesnt lose the values now shows i'm still a complete noob :P
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|