show date for when form updated

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jonnyfortis
Forum Contributor
Posts: 462
Joined: Tue Jan 10, 2012 6:05 am

show date for when form updated

Post by jonnyfortis »

i have a form that when it is submitted it show in the back end of the system the date that it was submitted. is there some php that i can add to the form to show date the form was submitted then echo the results in the back end admin page?


thanks in advance
jonnyfortis
Forum Contributor
Posts: 462
Joined: Tue Jan 10, 2012 6:05 am

Re: show date for when form updated

Post by jonnyfortis »

would i need to add an hidden value on the form to send to the db the call the value to the page i need it displayed on?
jonnyfortis
Forum Contributor
Posts: 462
Joined: Tue Jan 10, 2012 6:05 am

Re: show date for when form updated

Post by jonnyfortis »

<input type="hidden" name="updatedDate" value="<?php echo date("d-M-y"); ?>" />

thats seems to have done it
User avatar
Grizzzzzzzzzz
Forum Contributor
Posts: 125
Joined: Wed Sep 02, 2009 8:51 am

Re: show date for when form updated

Post by Grizzzzzzzzzz »

if you're storing the information in a database, just add a field with an automatic timestamp, will keep the form cleaner
jonnyfortis
Forum Contributor
Posts: 462
Joined: Tue Jan 10, 2012 6:05 am

Re: show date for when form updated

Post by jonnyfortis »

Grizzzzzzzzzz wrote:if you're storing the information in a database, just add a field with an automatic timestamp, will keep the form cleaner

what dont do it how have done it?
Post Reply