close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Setting Session Variable Help

Thread began 1/06/2011 3:19 pm by mrobben375515 | Last modified 1/10/2011 12:49 pm by Jason Byrnes | 2434 views | 9 replies |

mrobben375515

Setting Session Variable Help

Hi, I have 2 pages with separate upload forms. The first one has 4 file upload fields and is supposed to set 4 session variables and then the next one has 6 upload fields and 6 session variables. After the second upload page the user is redirected to the cart page with the item they were uploading the files for. I inserted the php strings for the session variables there but they don't show up. The files are uploaded, but the session variables with the server image name are not set. Can you take a look and see what the problem is. I've attached the files below. Once that is working then I have an insert record on the confirm page that should insert the order ID and the server image names into a table. Thanks for the help. The first upload form url is upload_your_pet_photos.php

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

Jason ByrnesWebAssist

the code that sets the session variables is before the code that uploads the images.


you need to rearrange the code so that the images are uploaded first, then the sessions can be set.

Sign in to reply to this post

mrobben375515

Oh duh, that was an easy one I missed. I'm trying to use the eCart Store Cart Summary in Database to put the server image file name variables into the database along with the order id, but I'm getting the following error. I've attached the confirm.php page. Thanks

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[Photo1],[Photo2],[Photo3],[Photo4],[Photo5],[Photo6],[Photo7],[Photo8],[Photo9]' at line 1

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

Jason ByrnesWebAssist

did you name the photo columns in your database using the square brackets?:
[photo1]


this is not a valid column name, the square brackets should not be used in the column name.

Sign in to reply to this post

mrobben375515

No, the names are just Photo1, Photo2, etc. I don't know why the brackets are there. I took them out and everything works except that the order ID is not submitted. Is there a way I can get that to submit into the same table as the photo variables?

Sign in to reply to this post

Jason ByrnesWebAssist

in the store order details to store the photo info, you have the order id set as the primary key column, you need to set another column as the key column, then bind the order id column to the OrderID session variable created by the store order summary behavior for the orders table.

Sign in to reply to this post

mrobben375515

I tried that, but the OrderID is still not showing up in the database. Any Idea why? I've attached the php file.

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

Jason ByrnesWebAssist

change the trigger of the store order summary behavior for the images to Submit Order button pressed instead of using Any form Post.

Sign in to reply to this post

mrobben375515

Thanks, I figured out I also didn't have the Order ID set right, so it wasn't putting it in the database. thanks for the help.

Sign in to reply to this post

Jason ByrnesWebAssist

ok, glad to hear it is working.

Sign in to reply to this post
loading

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...