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

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-01-2007, 02:22 AM   PM User | #1
ab123
New Coder

 
Join Date: Jun 2005
Posts: 41
Thanks: 3
Thanked 0 Times in 0 Posts
ab123 is an unknown quantity at this point
php date time

Im not quite sure on how to display or process this for my site but im realy in need of it......

My problem lies here:

What i want to do is have the user input there own dates and times for their event. I will then process the dates/times and enter into mysql...but this is where im confused.......

Here is an image of the form fields how i want it to look it:

http://i16.photobucket.com/albums/b1...rmdatetime.jpg

how do i process these using php, and how do i insert it into mysql for future use... how do i select them from mysql when its the current date...

thanks for reading, hope you can help me........
ab123 is offline   Reply With Quote
Old 08-01-2007, 03:40 AM   PM User | #2
whizard
Senior Coder

 
whizard's Avatar
 
Join Date: Jan 2005
Location: Philadelphia, PA, USA
Posts: 1,457
Thanks: 10
Thanked 37 Times in 37 Posts
whizard will become famous soon enoughwhizard will become famous soon enough
Try using the TIMESTAMP field type in your database:

http://dev.mysql.com/doc/refman/5.0/en/timestamp.html

Dan
__________________
If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.
Step 1: Learn. Step 2: Search. Step 3: Post here.
whizard is offline   Reply With Quote
Old 08-01-2007, 03:47 AM   PM User | #3
Len Whistler
Senior Coder

 
Len Whistler's Avatar
 
Join Date: Jul 2002
Location: Vancouver, BC Canada
Posts: 1,323
Thanks: 26
Thanked 100 Times in 100 Posts
Len Whistler is on a distinguished road
I recommend you get a book on PHP/MySQL. This would be a good protect for a first time coder. The date time form would be a pull down select menu generated from a php array of days, months and time. Results then POSTed into the MySQL database, very easy to do this.

Good book is PHP and MySQL For Dynamic Websites by Larry Ullman, which has an example of the pull down menu you need.
__________________
Leonard Whistler
Len Whistler 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:40 AM.


Advertisement
Log in to turn off these ads.