TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 12-21-2007, 10:07 PM   #21 (permalink)
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default

so how would I do that? Use

if preg_match() and somethingorothertellingmethatitisn'tblank

?
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote
Old 12-21-2007, 10:11 PM   #22 (permalink)
The Wanderer
 
Join Date: Dec 2007
Posts: 14
Thanks: 0
gilzow is on a distinguished road
Default

Quote:
Originally Posted by Aaron View Post
so how would I do that? Use

if preg_match() and somethingorothertellingmethatitisn'tblank

?
PHP Code:
if (!preg_match('/^[A-Za-z ]+$/'$name) || trim($name)=='') {
     
$error.="Please, go back and fill out your name. This is your actual name that we will need, not your username.<br>\n";    

gilzow is offline  
Reply With Quote
The Following User Says Thank You to gilzow For This Useful Post:
Aaron (12-21-2007)
Old 12-21-2007, 10:22 PM   #23 (permalink)
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default

Alright, thanks...

I have (hopefully) one last thing...

I am having some serious problems with the code that checks for the pattern. The commonly used email validation doesn't allow .co.uk domain names, and the rest of it is really really hard to come up with.
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote
Old 12-22-2007, 12:24 AM   #24 (permalink)
The Wanderer
 
Join Date: Dec 2007
Posts: 14
Thanks: 0
gilzow is on a distinguished road
Default

Quote:
Originally Posted by Aaron View Post
Alright, thanks...

I have (hopefully) one last thing...

I am having some serious problems with the code that checks for the pattern. The commonly used email validation doesn't allow .co.uk domain names, and the rest of it is really really hard to come up with.
I would suggest checking out the regex pattern library and see if any of the ones they have match your needs. http://regexlib.com/DisplayPatterns....0&categoryId=1
gilzow is offline  
Reply With Quote
Old 12-22-2007, 01:50 AM   #25 (permalink)
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default

Gilzow, you are a lifesaver. Thanks so much to everyone who helped me on this!
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote
Old 12-22-2007, 11:58 PM   #26 (permalink)
The Wanderer
 
Join Date: Dec 2007
Posts: 14
Thanks: 0
gilzow is on a distinguished road
Default

Quote:
Originally Posted by Aaron View Post
Gilzow, you are a lifesaver. Thanks so much to everyone who helped me on this!
no problem. glad i could help out.
gilzow is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 02:25 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design