You need to look up $HTTP_SESSION_VARS['name']  - that's how to change the
variables when they are already set......
i think most people have this problem when they first use sessions!

-----Original Message-----
From: Terry Romine [mailto:[EMAIL PROTECTED]]
Sent: 15 May 2002 15:49
To: [EMAIL PROTECTED]
Subject: [PHP-DB] session variables across several pages 


First, forgive me if this seems to be cross post -- but it does involve 
both PHP and MySQL.

My client requirements are:
 From their website, they display a list of classes. On registering for a 
class, the user is sent to a secure page that is hosted on a different 
secured server that does not have access to the client's MySQL database. 
I pass in the class info so the registration form can display
        "Registering for class $title<br>$start_date<br>$cost"
The form then gathers name, address, etc including credit card info.

On submitting the form, the data is processed and a PGP email is sent 
out to the registar.

Then a thank you page is displayed and the user is forwarded back to the 
main site, where a second page is displayed allowing for either download 
of class materials or to return to the class list. This page is where I 
post the necessary info into the MySQL database.

So my dilemma -- I want to use session_register to capture the field 
info from the registration form and then read it back out on the website 
thank you page.

I have
     session_start();
     session_register("start_date");
     session_register("end_date");
     session_register("section");
     session_register("class");
     session_register("title");
     session_register("class_id");
     session_register("register_id");
     session_register("name");
     session_register("employer");
     session_register("e_address");
     session_register("e_city");
     session_register("e_state");
     session_register("e_zip");
at the beginning of the form page (select_class.php) and the thank you 
page on their website (thanks.php) where I post the info to MySQL.
The form includes inputs such as
         <td><p><b>Name:</b></p></td>
         <td colspan=3>
           <input type=text name=name maxlength=100 size=60
                 value="<? echo($name); ?>">
         </td>

What happens is that old data shows up for name, and address (the only 
fields I have tested so far) regardless of what I enter in the form. I 
was under the impression that a registered variable is updated once the 
page is processed. If I am calling the same page (select_class.php) to 
process the form, does the data get reverted somehow? The data just 
doesn't seem to get updated to the form inputs.

What might I be missing?

Thanks in advance
Terry Romine
Web Developer
JumpInteractive.com


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to