in reply to Simple Email Script
The particular regex I used may not meet your needs, and sanitizing the other pieces may be more difficult, but this is the general idea I think you'll want.$firstname =~ /^([\w ]+)$/; $firstname = $1; if( length($firstname) < 1){ $firstname = "no valid name provided"; } # now $firstname contains only # numbers, letters, spaces and underscores.
Oh, to reply more to the question you actually asked - add this: "use CGI::Carp( 'fatalsToBrowser' );" to your script while you're debugging. Then you'll get a better description than "HTTP 500" when things go wrong.
Good luck!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Simple Email Script
by theguvnor (Chaplain) on Mar 08, 2002 at 02:59 UTC | |
by gellyfish (Monsignor) on Mar 09, 2002 at 15:50 UTC |