Need Help - how to include session data into a form
Posted: Sat Mar 31, 2012 5:29 pm
hello sirs,
Can you please help me with how best to go about this.
For example, I have an index.php page on which a user makes some choices of products, using a pull down menu, etc., I have a cart whereby when a product is chosen and "added". Chosen products are displayed in a so called basket. I store the sessionID, productID and productName in the DB.
To finally submit the order, the user is supposed to fill up his name and email address in a form and click the submit botton.
I coded the form (name, email address) sepately and inserted it on the index page using using an include statement:
For example, suppose the user had chosen 3-products and there are 3-products are in the cart, each referenced with sessionID #1234567.
After the user fills up his name and email address, I want the form to send the names of the three products, the filled-in name and email address (5 data in all ) in an email.
Please note, by itself, the form works. It can send the name and email addr entered to the configured email address.
I just need advise on how to include these external data(already captured in reference to a sessionID/#) in the email to be sent.
And pls, just in case the way im going about it is wrong, kindly advise.
thanks
Toks
please advise, how can this be done.
Can you please help me with how best to go about this.
For example, I have an index.php page on which a user makes some choices of products, using a pull down menu, etc., I have a cart whereby when a product is chosen and "added". Chosen products are displayed in a so called basket. I store the sessionID, productID and productName in the DB.
To finally submit the order, the user is supposed to fill up his name and email address in a form and click the submit botton.
I coded the form (name, email address) sepately and inserted it on the index page using using an include statement:
By itself, the form works, but when I include it on the index page, I want it to send (1) the forms own contents(name, email addr) and (2) the data saved in the DB against the current sessionID of the index page together - as an email.<div id="contactus">
<?php include("contactform.php"); ?>
</div>
For example, suppose the user had chosen 3-products and there are 3-products are in the cart, each referenced with sessionID #1234567.
After the user fills up his name and email address, I want the form to send the names of the three products, the filled-in name and email address (5 data in all ) in an email.
Please note, by itself, the form works. It can send the name and email addr entered to the configured email address.
I just need advise on how to include these external data(already captured in reference to a sessionID/#) in the email to be sent.
And pls, just in case the way im going about it is wrong, kindly advise.
thanks
Toks
please advise, how can this be done.