Click here to Skip to main content
15,923,222 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi ,

i want to make a dropdownlist of one day only per week [ Friday ] .
How can i do this ?

more clarification : user will choose from the below list .

please choose the date :

Friday 1-11-2013
Friday 8-11-2013
Friday 15-11-2013
Friday 22-11-2013

etc - - - -

Thanks
Posted
Comments
CHill60 24-Nov-13 11:17am    
Are you saying that you don't know how to create a dropdown list in HTML5 or are you saying you don't know how to get the dates in PHP??
Hercal 24-Nov-13 11:27am    
i know how to create dropdown list , all i want to make the choices only one day per week
CHill60 24-Nov-13 12:07pm    
Not sure this is the best way but ... You could use getdate() to get the current date, then in a loop check for [weekday] = 'Friday', if it isn't a Friday then use date_add() to add 1 day at a time. Once you have the first Friday then just add 7 days to that date for as many iterations as you require
Hercal 24-Nov-13 12:27pm    
So in your opinion ... what is the best way ??
it is a meeting that hold every Friday , i need to take the attendance in this day , no need to display all the calender , so i choose the day ,for example 22-11-2013 , and then register who attend .
Is there another way to do what i want in a better way than i think ?
CHill60 24-Nov-13 12:32pm    
You misunderstood ... I'm not sure that my suggestion was the best way to go about solving your problem. That's why I didn't post it as a solution - although I will if you are able to get it to work that way

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900