logo-dw

Go Back   Dreamweaver Club Forums > Dreamweaver forums > Dreamweaver General
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 11-18-2009, 06:08 PM   #1
tommtomm
 
Join Date: Nov 2009
Posts: 3
Default Validating forms

Hi all, I hope you can help.
I am building a form for doctors to fill in the last 5 years address.
As you can imagine people move around and some have up to 8 adresses.
I would like to lern how to compare the dates of each addresss, so that if they by accedent have overlapping dates it warns them and will not let them send the form.
Or maybe a date selector that will not let them select overlapping dates.
Not sure which is easier to do.
If any1 has any idea of how to do this, please let me know what I would have to learn, ie Javascript, PHP as I am not a programmer.

Thanks for your help.
tommtomm is offline   Reply With Quote
Old 11-19-2009, 01:22 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,187
Default

in php you can compare dates so i would say it could be done this way, what if a patient has 2 address at the same time though?
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is online now   Reply With Quote
Old 11-19-2009, 09:30 AM   #3
tommtomm
 
Join Date: Nov 2009
Posts: 3
Default validation

thanks for the reply.
Yes you are right they might have 2 addressess but they must be living in 1 location at a time. This is a form for a police check and the police have to have continous addresses, for example:

2 Funny road
London
W12 8gh
UK
sep/2009 - Nov/2009

The one before that must match.

2 Silly road
London
w12 8qb
UK
Jan/2004 - sep/2009

see how the date of the second address matches the date of when they moved to new address.

They must match and not overlap.

But it could have dates like:

Jan/2004 - Aug/2009

This is also acceptable as it is clear that the next month (sep) they moved to the new address.

Sorry if this is a bit confusing, but the police must get the info this way otherwise they will not accept it. and the form gets rejected.

If you are able to do it in PHP, What words should I use to try and search for this type of coding. What I mean is, what branch of PHP should I look under to learn how to do this type of validation.

again many thanks for trying to help me.
tommtomm is offline   Reply With Quote
Old 11-20-2009, 02:19 AM   #4
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,187
Default

ok , try the tutorials at tizag for date ( i warn you though it is not the simlest of php) and yahoogle date compare. PHP you will fint lots . i will have a look later i know i have a function for it but will have to look into no overlap . im certain it cn be done though
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is online now   Reply With Quote
Old 11-20-2009, 10:25 AM   #5
tommtomm
 
Join Date: Nov 2009
Posts: 3
Default

Thank you edbr, your a saint. I will look up those tutorials and try to work it out. I hope its not too difficult, but I guess if you want something specific you always have to spend more time.
tommtomm is offline   Reply With Quote
Reply


Thread Tools
Display Modes

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. The time now is 05:45 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com