Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Old 11-07-2009, 10:35 PM   PM User | #1
stevenmw
New Coder

 
Join Date: Jun 2007
Location: Bremerton, WA
Posts: 52
Thanks: 8
Thanked 0 Times in 0 Posts
stevenmw is an unknown quantity at this point
Date Function And Checkboxes

Is there a way to use the php date function to submit the date into a database, and then be able to pull it out however I want? The main thing I want to achieve is to be able to pull the date from the db and have the option to display the date in multiple ways.

Would the explode function work?


Another thing..
I'm displaying a list of categories from my db. Each category is tied to an html checkbox. How can I submit multiple categories to the db at once?
stevenmw is offline   Reply With Quote
Old 11-07-2009, 10:49 PM   PM User | #2
kbluhm
Regular Coder

 
kbluhm's Avatar
 
Join Date: Apr 2007
Location: Philadelphia, PA, USA
Posts: 746
Thanks: 2
Thanked 100 Times in 97 Posts
kbluhm is on a distinguished road
Store it as DATETIME... always, ALWAYS.

Display it using DATE_FORMAT()
http://dev.mysql.com/doc/refman/5.1/...on_date-format
__________________
ZCE
kbluhm is offline   Reply With Quote
Old 11-07-2009, 11:05 PM   PM User | #3
stevenmw
New Coder

 
Join Date: Jun 2007
Location: Bremerton, WA
Posts: 52
Thanks: 8
Thanked 0 Times in 0 Posts
stevenmw is an unknown quantity at this point
Quote:
Originally Posted by kbluhm View Post
Store it as DATETIME... always, ALWAYS.

Display it using DATE_FORMAT()
http://dev.mysql.com/doc/refman/5.1/...on_date-format

I know all about the date format, but that would submit the date in one set format. I'm wanting to submit it and be able to pull it out in al kinds of formats.
stevenmw is offline   Reply With Quote
Old 11-08-2009, 01:37 AM   PM User | #4
kbluhm
Regular Coder

 
kbluhm's Avatar
 
Join Date: Apr 2007
Location: Philadelphia, PA, USA
Posts: 746
Thanks: 2
Thanked 100 Times in 97 Posts
kbluhm is on a distinguished road
Unless I am misunderstanding your reply, I don't believe you entirely understand what I suggested.
__________________
ZCE
kbluhm is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:37 AM.

Home - Contact Us - Archives - Link to CF - Resources - Top 

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.