Hi all!
I've got form in one page that posts value of date (written in textbox) to second page.
I've got two questions.
In what format should date be written in text box
date month year
month date year
month/date/year
or how
second question
how to convert that date to time()
[SOLVED] date to time()
Moderator: General Moderators
I may be wrong, but I think the American standard is Month/Day/Year and the British (and Canadian and probably everywhere else) standard is Day/Month/Year.
I'd make each section it's own textbox. Then, you can easily use [php_man]mktime[/php_man]() to get your timestamp.
I'd make each section it's own textbox. Then, you can easily use [php_man]mktime[/php_man]() to get your timestamp.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
-
litebearer
- Forum Contributor
- Posts: 194
- Joined: Sat Mar 27, 2004 5:54 am
What's your setup? Do you have just a plain HTML textbox? If so, you could type anything you want in there, it's just a matter of how it is handled on the second page.
Your best bet is to convert whatever format you choose to timestamp as soon as possible, as it's much easier to handle and manipulate.
Your best bet is to convert whatever format you choose to timestamp as soon as possible, as it's much easier to handle and manipulate.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
i got around this problem by useing javascript....which wont work on some computer cos the whole 'javascript is evil' deal, but it was for admin area on a project, so its ok
.
get a popup calendar script, such as
http://www.dynamicdrive.com/dynamicinde ... lendar.htm
http://www.dynamicdrive.com/dynamicinde ... endar2.htm
then make the textbox READ ONLY, so users cant type it in, they must select a date, simple eh
.
get a popup calendar script, such as
http://www.dynamicdrive.com/dynamicinde ... lendar.htm
http://www.dynamicdrive.com/dynamicinde ... endar2.htm
then make the textbox READ ONLY, so users cant type it in, they must select a date, simple eh