?
Solved

How do I capture the system date in PHP/MySQL?

Posted on 2006-04-15
5
Medium Priority
?
366 Views
Last Modified: 2013-12-12
I have 2 forms. The data from form 1 gets captured in form 2 when I press submit in form 1. I have a table in form 2 which should be automatically populated with the system date. How can this be done?
Thanks,
A
0
Comment
Question by:aej1973
  • 2
  • 2
5 Comments
 
LVL 28

Accepted Solution

by:
gamebits earned 500 total points
ID: 16461458
<? NOW() ?>

or <? echo date('l dS \of F Y h:i:s A');  ?>

Gamebits
0
 
LVL 17

Expert Comment

by:BogoJoker
ID: 16461521
Hi aej1973,

Or just time();
$currentTime = time();

Joe P
0
 

Author Comment

by:aej1973
ID: 16461587
Hi gamebits & Joe,
<? echo date('l dS \of F Y h:i:s A');  ?> works. None of the other suggestions do, though.
0
 
LVL 28

Expert Comment

by:gamebits
ID: 16462531
Thanks for the points and the grade.

Gamebits
0
 

Author Comment

by:aej1973
ID: 16462697
You are welcome and thank you for the help.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses
Course of the Month16 days, 19 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question