
newlines and query -> param / problem with apostrophes
Hi
I have a perl script which obtains values from a textarea on the web.
Although I have the textarea set to "WRAP=physical", when try to get the
content of my texarea i.e.
$query = new CGI;
$Description = $query->param("description");
The text comes out as one long string, without newlines.
Is there a way of using $query->param so I can preserve newlines?
My second question may be a bit off topic as it partly refers to SQL (I
hope people don't mind, but it also relates to perl).
If, in my text I have something like:
"The users' data" , i.e. I have a apostrophe after users, the data are
not accepted into the SQL database, I think because the ' ends the input
string abruptly during the INSERT statement. Is there a way in perl to
neutralise such characters, so they will not create problems when an
INSERT statement is made to SQL?
Any help will be greatly appreciated.
Thanks
Hugo
--
Dr Hugo Bouckaert
Systems and Programming Engineer
Fractal GeoInformatics
57 Havelock St
West Perth, WA 6005
PO Box 1675, West Perth 6872
Ph: 61 08 9211 6000
Fax: 61 08 9226 1299
www.fractalgraphics.com.au
------------------------------------------------------------------------
This email and any attachments may be confidential or legally
privileged. If you received this message in error or are not the
intended recipient, you should destroy the e-mail message and any
attachments or copies, and you are prohibited from retaining,
distributing, disclosing or using any information contained herein.
Please inform us of the erroneous delivery by return e-mail. Thank you
for your cooperation.