PHP on Confirm Page

User 414636 Photo


Registered User
1 post

Is there a way to add some php code to the Confirmation message that is under Settings/Confirm Options?

Basically when my form is submitted,on the confirmation page I need to display 180 days from today's date. My form is an application for a permit, which expires 180 days from the date it was submitted. I can display the submitted date, but have not figured out how to insert the php code that adds 180 days from today's date.

Thanks.
User 187934 Photo


Senior Advisor
20,193 posts
Online Now

How about sending the data to a mysql then make and redirect to your own confirmation page with the proper php code squeezing the date from it.:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 464893 Photo


Ambassador
1,611 posts

I think this should work. Use the value from a mysql database as Eric said.
<?php
//I had to put my time zone in to test but it seems to work
date_default_timezone_set('Australia/Sydney');
echo date('Y-m-d', strtotime($Date. ' + 180 days'));
?>
I get from Oct 27th 2012 + 180 days = 2013-04-25
This will get you started.
The Guy from OZ



Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.