Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~256 People Reached
Favorite Forums
Favorite Tags
php x 3
Member Avatar for wireshop

I've got this script to validate phone numbers. I want to allow numbers 0-9 and the characters -,(,) and + the following seems to only work if the input is all numbers and spaces. Suggestions? [code] if(!ereg("^[0-9\-\(\)\ \+]+$", $phoneNumber)||empty($phoneNumber)){ print'Please enter a valid phone number' ; $error++; } [/code]

Member Avatar for clearstatcache
0
145
Member Avatar for wireshop

I'm having a trouble getting my php script to validate user input what am I doing wrong here? This just displays the error message all the time. for example: [code] if(!preg_match("/[^a-zA-Z0-9\.\-\Ä\ä\Ö\ö\Ü\ü\ ]+$/",$name)||empty($name)) { print '<td colspan="2" class="ErrorText"><div align="right">Please enter a valid name without special characters i.e. *,/,&lt; etc. </div></td>'; $error++; …

Member Avatar for cereal
0
111