close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Automated date "+1 year" syntax error.

Thread began 8/07/2014 1:34 pm by FrankJay | Last modified 8/07/2014 1:44 pm by Jason Byrnes | 749 views | 1 replies |

FrankJay

Automated date "+1 year" syntax error.

I have a subscriber update page that has a stored value for the registration date. I'd like to have a hidden field with the value of:

renewal date = registation date +1 year

so that when the page is updated, it will replace the existing renewal date in the db.

I have had a stab at the code, but somewhere I have a syntax error.

<input id="ri_SubscriberRenewalDate" name="ri_SubscriberRenewalDate" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("riSubscribersupdate","ri_SubscriberRegistrationDate"):"".(($row_WADAri_Subscribers["ri_SubscriberRegistrationDate"])?date("n/d/Y",strtotime($row_WADAri_Subscribers["ri_SubscriberRegistrationDate"] "+1 year")):"")."")); ?>" class="formTextfield_Medium" tabindex="20" title="Please enter a value.">

Could you kindly have a look and perhaps correct my coding syntax to achieve the objectives described above

Sign in to reply to this post

Jason ByrnesWebAssist

strtotime($row_WADAri_Subscribers["ri_SubscriberRegistrationDate"] "+1 year")

should be:
strtotime($row_WADAri_Subscribers["ri_SubscriberRegistrationDate"] ." +1 year")

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