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

show date for when form updated

Postby jonnyfortis » Tue Jun 26, 2012 5:57 am

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: 359
Joined: Tue Jan 10, 2012 7:05 am

Re: show date for when form updated

Postby jonnyfortis » Tue Jun 26, 2012 6:04 am

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: 359
Joined: Tue Jan 10, 2012 7:05 am

Re: show date for when form updated

Postby jonnyfortis » Tue Jun 26, 2012 6:21 am

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

thats seems to have done it
jonnyfortis
Forum Contributor
 
Posts: 359
Joined: Tue Jan 10, 2012 7:05 am

Re: show date for when form updated

Postby Grizzzzzzzzzz » Tue Jun 26, 2012 8:24 am

if you're storing the information in a database, just add a field with an automatic timestamp, will keep the form cleaner
User avatar
Grizzzzzzzzzz
Forum Contributor
 
Posts: 125
Joined: Wed Sep 02, 2009 8:51 am

Re: show date for when form updated

Postby jonnyfortis » Wed Jun 27, 2012 4:17 am

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?
jonnyfortis
Forum Contributor
 
Posts: 359
Joined: Tue Jan 10, 2012 7:05 am


Return to PHP - Code

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 13 guests