This is a discussion on "Form Validation Help" within the PHP Forum section. This forum, and the thread "Form Validation Help are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Form Validation Help
|
||
| Notices |
![]() |
|
|
LinkBack (1) | Thread Tools |
#1
|
|||
|
|||
|
Form Validation Help
Hello All,
My first post... I've designed a contact form for a website that requires the entry of either a mobile number, home number or work number. Any ideas as on what sort of coding I could use that would validate that a user has entered one of the above phone numbers? I've played around with various if and switch statements that I found on the web but have had no luck. Can anyone help? |
|
|
|
#2
|
|||
|
|||
|
Re: Form Validation Help
|
|
#3
|
|||
|
|||
|
Re: Form Validation Help
Wow Quick Reply!
Just to clarify I have three text fields - I just want to validate that one of the three contact numbers has been entered by the user. Something like this: http://www.foxtons.co.uk/cgi-bin/con..._nhgt000233972 |
|
#4
|
|||
|
|||
|
Re: Form Validation Help
Ye so you would need:
$number1 == null $number2 == null $number3 == null etc. |
|
#5
|
|||
|
|||
|
Re: Form Validation Help
Thanks but that's not working...
Does anyone know if this statement is correct: if ((($mobile_phone ==""))(($home_phone ==""))(($work_phone ==""))){ "- You did not enter a contact number."; $error=1; } I keep getting a parse error: Parse error: parse error, unexpected '(' |
|
#6
|
|||
|
|||
|
Re: Form Validation Help
Too many (()) it only needs one, example
|
|
#7
|
|||
|
|||
|
Re: Form Validation Help
However I probaly would use one of the php string evaluation functions to make sure they are giveing you a real phone number. |
|
#8
|
|||
|
|||
|
Re: Form Validation Help
Thanks for that Phoenix
|
![]() |
| Tags |
| form, validation, help |
| Thread Tools | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://webforumz.com/php-forum/4396-form-validation-help.htm
|
||||
| Posted By | For | Type | Date | |
| flash form validation | This thread | Refback | Sep 5th, 2006 19:02 | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Form validation help! | psycho wolvesbane | JavaScript Forum | 16 | Feb 12th, 2008 16:40 |
| Form Validation | cjrollo | Flash & Multimedia Forum | 0 | Feb 22nd, 2007 17:33 |
| Form Validation | feebee | JavaScript Forum | 1 | Aug 3rd, 2006 16:12 |
| PHP Form Validation. | kaz | PHP Forum | 2 | Jul 22nd, 2006 20:47 |
| PHP Form Validation ??? | j4mes_bond25 | PHP Forum | 2 | May 31st, 2006 23:08 |