I have a simple form with a few fields directed to a text file.
One of the fields is a textfield. When this is filled in without new line (carriage return) there is no problem and the field is recorded normally. However if the user uses the carriage return to begin a new line this starts a new line in the text file.
I have tried stripping out new lines and / or carriage returns but this strips out the whole response for that field.
I'd be grateful for some help on this.my $address=$query->param('address'); my $address =~ s/\n/<br>/g; my $address =~s/\r//g;
In reply to How to handle new lines in textfield (CGI) by jonnyfolk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |