close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Session variables not sent to database

Thread began 7/14/2010 3:18 pm by mrobben375515 | Last modified 7/15/2010 7:27 am by Jason Byrnes | 775 views | 1 replies |

mrobben375515

Session variables not sent to database

I created some new fields in the checkout page and I'm trying to save them as session variables, have them post to the database on the confirm page, and then show up in the email. I've already posted with questions on how to do this, so I thought I new how. I created the form fields, created the session variables by going to eCart > General > set session value. I used the lightning bolt to select the trigger as the form element and the same thing for the value. And I opened the confirm page and created a dataassist single file upload behavior. Lastly, I added the session variable strings in the email. Nothing is showing up in either the email or the database, so I can't figure it out. I've attached my checkout.php page.

Attached Files
checkout.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the checkout form posts to the confirm page.

When adding form elements to the checkout form there are 3 steps you must follow:

1) Add the form element to the checkout page:

php:
<input name="newElement" id="newElement" type="text" />


2) Add a hidden form element on he confirm page with the same name, set to capture the value from the checkout page:

php:
<input name="newElement"  id="newElement" type="hidden" value="<?php echo((isset($_POST["newElement"]))?$_POST["newElement"]:""?>" />



3) Add the set session value behavior tpo the confirm page to capture the value posted from the checkout page:

php:
<?php

if (!session_id()) session_start();
if(
$_SERVER["REQUEST_METHOD"] == "POST")     {
  
$_SESSION["newElement"] = "".((isset($_POST["newElement"]))?stripslashes($_POST["newElement"]):"")  ."";
}
?>
Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

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.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...