close ad
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

How do I get coupon code in db?

Thread began 7/21/2009 2:22 pm by dan361579 | Last modified 3/18/2010 10:16 am by dan361579 | 3814 views | 11 replies


Not quiet there yet.

Thanks Ray,

I'm just a bit more ignorant than the reply suggests. lol. Here is a snippet of how I implemented the server action.

In the $WA_fieldNamesStr variable I inserted the column |CouponCode| to the list of db field names.

Then I went to $WA_fieldValuesStr and inserted "PromoCode" into the string of variables as shown below:

$WA_fieldValuesStr = "".session_id() ."" . "|". "".((isset($_SESSION["PromoCode"]))?$_SESSION["PromoCode"]:"") ."" . "|" . "".((isset($_POST["email"]))?$_POST["email"]:"") ."" . "|" ...string goes on....

Then I went to $WA_columnTypesStr below and inserted |',none,' '| to account for the new PromoCode field here too.

I then ran a live transaction. The transaction posts to the db, but the CouponCode field is empty. It used to say NULL, so something is different because now it's just blank. I get no errors, but I'm thinking the syntax of the $WA_fieldValuesStr is wrong where I've inserted the field.

BTW, what's this syntax mean? ((isset(true/false))?superglobal:"")
It looks like an if then where the "?" is "THEN" and the ":" would be an assignment of something if the superglobal wasn't already set, but I'm unsure of the "?" and the ":" usage. I've looked on line and in my PHP manual, but can't find an answer.

Thank you!!

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





Ease of use


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