# How to use $dbh-\>quote, or, secure web I/O in Perl

**URL:** <https://forum.kirupa.com/t/how-to-use-dbh-quote-or-secure-web-i-o-in-perl/280226>\
**Category:** programming\
**Created:** [January 24, 2009, 3:29pm UTC](https://forum.kirupa.com/t/how-to-use-dbh-quote-or-secure-web-i-o-in-perl/280226 "2009-01-24T15:29:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamhere](https://avatars.discourse-cdn.com/v4/letter/i/c57346/32.png) [@iamhere](https://forum.kirupa.com/u/iamhere)\
**Post date:** [January 24, 2009, 3:29pm UTC](https://forum.kirupa.com/t/how-to-use-dbh-quote-or-secure-web-i-o-in-perl/280226/1 "2009-01-24T15:29:39Z")

</div>

Hello,  
I have a CGI script for a website which has lines like this:

$sth=$dbh-\>prepare (qq{ INSERT INTO people VALUES (NULL,’$name’,’$city’,’$state’,’$country’) } ).

Now, for example, if the name fields input was “O’Reilly”, this script would fail. I’ve been told on another website to use the $dbh-\>quote method for this - can anyone show me how to, please?

Thanks very much.
