Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Calendar Date Picker using Dreamweaver to insert into MySQL

Posted on 2011-03-08
9
Medium Priority
?
6,708 Views
Last Modified: 2012-05-11
I have built a small communication portal using dreamweaver and php/mysql.  I am looking for a good way for the user to submit date information to the DB, in a user friendly way by selecting the dates on a calendar.  I have found several calendars that would do the job, but would like to find a tutorial or direction that helps explain how to install and work with Dreamweaver's PHP output code which can be a bit confusing.  any suggestions?
0
Comment
Question by:axessJosh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 1000 total points
ID: 35071485
Hi axessJosh,

Apples and oranges.  Dreamweaver only cares about the data submitted via the form, so any datepicker will work with the behavior.  The only thing you need to do is make sure the datepicker can be configured to write MySQL dates after a day is selected: YYYY-MM-DD

I tend to use the JQuery UI datepicker for this:

http://jqueryui.com/demos/datepicker/
0
 
LVL 2

Author Comment

by:axessJosh
ID: 35071542
Have you found a datepicker that works with Dreamweaver's update form wizard easily?  I am just concerned about getting in and messing up the extra PHP code that Dreamweaver adds.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 35071634
Yes, I linked to it above.

You're overthinking this.  As long as the datepicker can be configured to write YYYY-MM-DD it will work.  All DW does is submit that value to the database.

>> messing up the extra PHP code that Dreamweaver adds.

The only "extra" code is the function that scrubs the data to prevent a SQL-injection attack.  So long as you are submitting date values to a MySQL date field, my advice above applies.   If you are submitting date values to a varchar or char field, then you don't even need to worry about the YYYY-MM-DD part...
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 2

Author Comment

by:axessJosh
ID: 35073711
Were you able to get jquery working in a testing environment?  I am using Wamp Server on my Localhost but cannot seem to get the Javascript to work for the date picker, even though i can get some open browser window functions to work.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 35073906
I'm using it in production environments.  As long as you are making the correct calls to the libraries, it shouldn't be a big deal.
0
 
LVL 2

Author Comment

by:axessJosh
ID: 35130627
Have you seen a way to only enable Sundays to be selected?
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 35130646
You would have to restrict it to only those days.  I would not use a calendar datepicker for this and instead just create a mysql table that holds all possible Sundays as a date column and build a select list using that.
0
 
LVL 2

Author Comment

by:axessJosh
ID: 35130660
ok, i did that, just wanted to see if there was a simpler way than having to add all the possible Sundays every year.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 35130683
No.   The more hyperspecific your requirements are, the less likely you will be to find a pre-generated solution.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

618 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