Topic: Any PHP buffs in here?
isaac_dede's photo
Mon 09/28/15 11:53 AM
Edited by isaac_dede on Mon 09/28/15 12:02 PM
hello all,

im working on a simple php web app, now I'm definitely not a software developer by any means so I understand this may seem very basic to some of you, but any help is appreciated.

essentially im creating a VERY basic meeting calendar,

user inputs date
user adds entry
submit,

this propagatea to backend mysql database (already created)

so here is where I actually need help.

first the date,
does php have a built-in date picker? or at least a function that will validate a proper date has been inputted?

or any recommendations for a basic date-picker (no java) that can be easily intergrated.

obviously the date value would have to be extracted in order to tie it the entry so later I can view the dates and see what entries are tied to it

any help is appreciated, or any good resources you'd recommend.

thanks all

oh, and I don't need it to look like a calendar at all, basically a list item for display would be ideal.

show a date on the left, then the entry in the right. but I do need to be able to navigate by date. currently looking at displaying 10 days at a time

isaac_dede's photo
Wed 09/30/15 11:58 AM
I guess I'll take the lack of responses as a nolaugh

but I'm going to keep trying lol.

So now I've now got my html form successfully addingd records to the back end database, I can now successfully push and pull records, however I still need to find some good resources on sanitizing user input, especially the date. but I also don't want it to be vulnerable to SQL injections etc....any takers?

mightymoe's photo
Wed 09/30/15 12:06 PM
lol, it's all greek to me... i don't even know what PHP is...

no photo
Wed 09/30/15 12:07 PM





essentially im creating a VERY basic meeting calendar,

user inputs date
user adds entry
submit



I have one on my phone, it's called a to-do list...i could easily copy the coding off its development software & run it off a compatible operating system which might even be java, but i'm not sure what exactly your application entails ohwell

Jaan Doh 's photo
Wed 09/30/15 04:54 PM
Edited by Jaan Doh on Wed 09/30/15 04:55 PM
Microsoft Visual Studio comes with a Calendar control,
This is what the majority of designers use to allow the user to select dates for reservations, booking etc.

The calendar control ought to work for regardless of your preferred language, wheter it PHP VB C# or Java.


Jaan
waving


Edit:
Resources: StackOverflow is definitely a superb resource.

zeety's photo
Wed 01/13/16 04:59 AM
If you want to do it without using any Javascript or Jquery I would probably use HTML drop down menus to select your date - PHP most deals with the interaction between HTML and MYSQL, so it doesn't have any sort of date selection integrated with people generally using alternative languages to make nicer ones anyway.

However - validation is pretty easily done once you have the drop down in place. Personally I would use a little bit of java to make the drop down adapt, selecting the month first then only showing the number of days available in that month; easier than making a calendar but better than having to have the PHP run a validation check for the day selected against the available days for that month, but if you did want to just input the date and then have it checked by the script that would be fine too and not too hard to put in place.

stulife's photo
Thu 01/14/16 02:27 AM
You want the entire code or just want to know about the implementation? Though I would suggests jQuery over php

isaac_dede's photo
Thu 01/14/16 06:20 AM

You want the entire code or just want to know about the implementation? Though I would suggests jQuery over php

Thanks this is an old topic, in the end I did use Jquery and php. This was a project for work that I've finished
..but when I get stuck again I know whk to reach out to! Thanks again.

PrinceMunda's photo
Fri 04/22/16 02:38 AM
Answer is no. PHP doesnt supply any date picker. Actually it is the job of the HTML. The input fields are related to HTMl.

Again, do HTML supplies any date picker by default? Answer is, No. With HTML5, HTML is providing number input. You can compile those for data input. I.e. One field for date, on for month and another one for year.

My recommendation is to use this jquery plugin http://keith-wood.name/datepick.HTML

To validate a proper date, use javascript regex on form submit (Button click) or on Focus Lost event.

Cristina12345's photo
Mon 05/30/16 07:29 PM
PHP IT'S HTML. I REALLY AM LOOKING AT SQL. NOW THAT SEEM AMAZGING.