Set Session on post
When I post to another page I want to set a session and have added the code but it does not set the session. I also tried to move it below the recordset and at the bottom of the head but nothing works.
What am I doing wrong.
When I post to another page I want to set a session and have added the code but it does not set the session. I also tried to move it below the recordset and at the bottom of the head but nothing works.
What am I doing wrong.
Hi
Your form is submitting to a different page, so the code at the top won't get processed. You need to put that code on the page that the form is submitting to (Ex_Select.php).
Effectively you are telling your page to send your form contents to a different page, but then you are asking it to run code on the same page.
Cheers
Ian
What I've been doing is setting an intermediate page to receive and create the session, what I had hoped was that the page with form could both post to the net page and set a session in the same operation.
Nick
Thats not how forms work.
A form can either post to itself, or post to another page.
If you want to post to itself then you put the actions on the same page triggered by the submit button. If you post to another page then thats where the code needs to exist.
If you want form to post to itself, and then perform another action then you will need to store the contents of the form in session variables or in a database to retrieve them on the next page.
Cheers
Ian
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.