Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: text entry into mysql using perl

by petethered (Pilgrim)
on Apr 16, 2001 at 10:29 UTC ( [id://72780]=note: print w/replies, xml ) Need Help??


in reply to text entry into mysql using perl

An real easy way to fix this problem is to simply alter your var

Example:

$body =~ s/([\'\`])/$1$1/gi;

This covers both forms of apostrope, doubleing it which is insert friendly ( only one gets inserted )

Since im one of those people who like to reinvent the wheel ( or better put carry my blueprints around ) for form_parsing, i just make the conversion automagically while my forminput is being stuffed into my arrays.

$value =~ /([\`\'])/$1$1/gi;

Pete

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://72780]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-03-29 11:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found