Am a bit new to using sessions and I have got a bit confused.
I am passing a session variable for the captha image.
My index.php starts off with:
* calls my_functions.php
* and first_page_fm.php
* and a_client_chk.php
* and b_email_act.php
* and confirm_disp.php
now later on it includes a form script:
require_once("first_page_fm.php"); // run BIG FORM
Inside the form the captcha script is run with the image
<span class="tab-cell-right" style="height: 40px; "><img src="captcha.php"> </a></span>
the session var is set:
$_SESSION['key'] = md5($string);
Now the form script re-runs index.php
which processes the form data.
<form name="main_fm1" action ='index.php' method = 'POST'>
So when the index re-runs (from the form) and the "session_start()" is encountered again, does the $_SESSION['key'] variable get lost ?
or does the "session_start()" pass it on ?
If passed on, this code should display it:
ECHO "Keytext: $keytxt";
But it shows up as empty
Any ideas on what I am doing wrong ?
Thanks for any input.