in reply to Sticky Forms

Remember to keep your forms cross-site-scripting safe.

Example:
#!/usr/bin/perl -w use strict; use CGI (); my $q = CGI->new(); # Your logic here. print <<EOF; <html><body> <form name="form1" action="form.pl" method="POST"> EOF print q~ Username: <input type="text" name="user_name" value="@{[ HTMLEncode( $q->param('user_name') ) ]}" > <br> Password: <input type="text" name="user_password" value="@{[ HTMLEncode( $q->param('user_password') ) ]}" > <br> <input type="submit" value="Submit"> ~; print <<EOF; </form> </body> </html> EOF #========================================================== sub HTMLEncode { my ($str) = @_; $str =~ s/&/&amp;/g; $str =~ s/"/&quot;/g; $str =~ s/</&lt;/g; $str =~ s/>/&gt;/g; return $str; }# end HTMLEncode()