close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Inserting current date, show if date is less than 364 days preceding current date, update to cur date (current date) to verify user

Thread began 4/07/2022 8:50 am by jo271221 | Last modified 4/07/2022 11:13 am by Ray Borduin | 116 views | 1 replies |

jo271221

Inserting current date, show if date is less than 364 days preceding current date, update to cur date (current date) to verify user

*** Edited 4/7/22 11:12am CST - Part 1 ie Update is working now.

I need to be able to verify my users annually. I want to
1) Adjust my update page to insert the current date into the verifieddate column however I am using the timestamp feature already in the updated column

insert the current date when the user updates their profile however I already have the update field using the timestamp
I attempted adding this with the intent to switch to a hidden field once I have it working - This showed the correct date but did not update
<input id="verifieddate" name="verifieddate" type="text" value="<?php echo date('Y-m-d H:i:s');?>" class="formTextfield_Medium">

This displays a 1970 date and also does not update to current date
<input id="verifieddate" name="verifieddate" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("userupdate","date('Y-m-d H:i:s')"):"".$WADAtbl_mytable_update->getColumnVal("verifieddate") ."")); ?>" class="formTextfield_Medium">

2) Add a show if rule to show 'Verify Your Listing' if the users verifieddate is over 366 days from current date and also show Verified if the users verified date is less than 365 from current date

This did not work
<?php
if ($WADAtbl_mytable->getColumnVal("verifieddate") <= 'CURDATE() AND verifieddate >= DATE_ADD(now(),INTERVAL 364 DAY') {
?>
<?php echo(($WADAtbl_mytable->getColumnVal("verifieddate"))?date('D n/j/Y',strtotime($WADAtbl_mytable->getColumnVal("verifieddate"))):''); ?>
<?php
}
?>

Pages attached and links in PM

Sign in to reply to this post

Ray BorduinWebAssist

For the update you can remove the hidden field and just use:

$UpdateQuery->bindColumn("verifieddate", "t", "", "WA_TIMESTAMP");

That should update with the current timestamp automatically.

Then when displaying use:
if (strtotime($WADAtbl_mytable->getColumnVal("verifieddate")) <= strtotime("-1 year") ) {

Sign in to reply to this post
Did this help? Tips are appreciated...

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