FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » validating / converting time for insertion into mysql DB??
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
validating / converting time for insertion into mysql DB?? [message #172189] Thu, 03 February 2011 15:59 Go to previous message
PAkerly is currently offline  PAkerly
Messages: 7
Registered: September 2010
Karma:
Junior Member
I've got a form where users enter in time into a textbox.
txttime1
txttime2

usually for 12:15 the user enters 1215 without the :, so basically the
user does not enter :

and in the db the time goes into the db as: 00:12:15 instead of
12:15:00

So what I want to do is somehow fix the time so that when a user
enters it as 1215, it changes the time to 12:15

so than the $_POST[txttime1] would be correct at 12:15 and not 1215

How would this be done?
TIA
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: pass variable in php construct
Next Topic: Looping through Web Service results
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 04:46:29 GMT 2024

Total time taken to generate the page: 0.17850 seconds