close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

timestamp in orders table when order is successful

Thread began 12/16/2009 6:36 am by watercolor346374 | Last modified 12/17/2009 6:57 pm by Eric Mittman | 1437 views | 3 replies |

watercolor346374

timestamp in orders table when order is successful

Hi,
I have a column in my orders table called date, it is a timestamp. When a customer hits the checkout in the confirm and the order is accepted by paypal, and all of the info is collected in the orders table, I want the date column to have the date using time stamp. This worked at one point and now it is not working. Do I need a record set called orders and then a session variable called date to have this post?
Thank you

Sign in to reply to this post

Eric Mittman

What is the value that you are currently inserting into the date column on your confirm page? You will need to ensure that the value you are inserting contains a properly formatted timestamp. When you say 'timestamp' are you referring to a unix style time stamp that is a integer value for the number of seconds or are you talking about a MySQL style timestamp field?

Regardless, you will need to ensure that the value you are inserting has a valid timestamp for the type of column you are inserting into. If you have no value currently setup like this the easiest thing to do would be to add in a session variable that has a value of the current time. You would then reference this session variable in the server behavior for the value of your date column.

Sign in to reply to this post

watercolor346374

I changed the db column to datetime (since this has worked for me in the past and in confirm.php I have it set up to post as: .((isset($_POST["Y-m-d G:i:s"]))?$_POST["Y-m-d G:i:s"]:"")
and this does not work.
Thank you

Sign in to reply to this post

Eric Mittman

The way you have the code for the date is not valid. You will need to set a variable to the current date and time in the format you specified like this:

php:
$the_current_time = date("Y-m-d G:i:s");



You would then insert this variable into your db. If you are not familiar with using variables in this way you can add in an extra hidden form element and set it's value the same as above with the date function. Then you can specify this posted element for the time in the db.

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