On Sat, 2005-09-10 at 01:44 -0500, David Gilden wrote: > <select name="message type"> > <option value="0">Choose type message</option>
> my $mt = param('message type'); > if (length($mt) == 0) { > This should only redirect it someone has not made a 'selection' .... > what am I missing? If the user truly has not made a selection, the $mt will be undef, and your script will throw a warning: if (!defined $mt) { # etc } However, it is very difficult for the user to fail to make a selection given a select element. It would usually require them to construct their own form, or HTTP request by hand. If you want to test if they have selected the "Choose type message" option, then you need to check if $mt contains the data "0". The length of "0" is 1 (since it is one character long), so (length($mt) == 0) will always fail. if ( (!defined $mt) || ($mt eq '0') ) { # Etc } -- David Dorward <http://dorward.me.uk/> "Anybody remotely interesting is mad, in some way or another." -- The Greatest Show in the Galaxy -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>