sonny Posted June 3, 2004 Share Posted June 3, 2004 Hello, I was wondering is someone can help I am makeing a custom form to addinto OSC, The problem ends up being say i register 1 session variables as so tep_session_register('var1'); $var1="hello"; -------------- Now when i create a aherf link to lead to the next page with tep_href_link I check that the var1 has been registered using if(tep_session_is_registered('var1')) { print "true <br>";} else {print"FALSE <br>";} It returns true -------------------------------- now here is the problem I have a session ID SET say "fd3d8f2759a65d7b5c2d9daa9197b553" This session holds some previously tep_registered variables ----------------------- I am using a select box with 2 choices, on account of the select value I am calling a tep_redirect() fuction to redirect to a certian page it so happens that when i use the form and redirect to the next page it generates a new session id and i lose the previously registered vars? like so <FORM name="form1" action="<?php echo $PHP_SELF; ?>" method="post"> <input type="hidden" name="action" value="process"> <option>---- Please Select Option ----</option> <option value="own">Own the property Im Listing</option> <option value="manage">Manage The property Im Listing</option> </select> <input type="submit" name="submit" value="Go"> </form> Now I am passing the hidden name and value to ignite the tep_redirect deccision like so $process = false; // check is post is set if(isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process')) { $process = true; if($HTTP_POST_VARS['choice'] == 'own') { $url_location="http://localhost/Registration/step4_own.php?".SID; tep_session_register('customers_choice'); $customers_choice = $HTTP_POST_VARS['choice']; tep_redirect("$url_location"); // close session (store variables) tep_session_close(); } // THE SECOND CHOICE if($HTTP_POST_VARS['choice'] == 'manage') { $url_location="http://localhost/Registration/step4_manage.php?".SID; tep_session_register('customers_choice'); $customers_choice = $HTTP_POST_VARS['choice']; tep_redirect("$url_location"); } // close session (store variables) tep_session_close(); } when i arive to the next page my session id is not fd3d8f2759a65d7b5c2d9daa9197b553 any more it changed ---------------------- The only thing i can figure is that say i have some previously registered vars from the last page under fd3d8f2759a65d7b5c2d9daa9197b553 now Say i go register a new var does this create a new session id? Anybody have a clue why? or mabee a work around so a can continuly pass the same session ID and register new vars under the same Id? I have already tried passing tep_redirect(tep_href_link('Registration/step4_manage.php', '', 'NONSSL')); And it still recreates a new session Please help Thanks Sonny Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.