| |||||||||||
| |||||||||||
passing a variable from PERL into an HTML form Posted by forrestcook (forrestcook), 4 October 2006 Here's my deal:I've got a guestbook program up and running (mostly) that requires for part of it's operation that a text field that was initially entered into an HTML form be passed through my CGI script and back into a hidden text field generated by the same CGI script. It's working fine until someone uses a double quote in the first text box and then it acts up. I could solve it by filtering out the double quotes (tr/"/'/ ![]() here's what I have as far as code snippets so far: Quote:
That's my header complete with commented out quote filter. Quote:
and that is where it prints into the hidden text field... any ideas? Need more info? I'll b checking back frequently... Forrest Cook Posted by admin (Graham Ellis), 5 October 2006 Try:$input{message} =~ s/"/"/g; It looks like your problem is a double quote within the double quoted string in the HTML. Replace the double quotes with the " code and it should be fine. Posted by forrestcook (forrestcook), 5 October 2006 wow.... I was trying to solve it in a much more complicated way. Thanks for the obvious answer that I would never have thought of!This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
|
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |