Re: Re: How to escape apostrophe in HTML textbox exactly???
| From: | Scott Fletcher | Date: | Thu, 01 Jul 2004 13:40:39 +0000 |
| Subject: | Re: Re: How to escape apostrophe in HTML textbox exactly??? | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-189458@lists.php.net to get a copy of this message | ||
Ah, when I enter the "mysql_escape_string" in the "search for" textbox, I
get a mysqli_escape_string webpage.... So, it wasn't me that make a mistake
after all.... I didn't know there is mysqli as well.
Scott F.
"Scott Fletcher" <scott@abcoa.com> wrote in message
news:20040701132927.2295.qmail@pb1.pair.com...
> Clicked on the search query on php.net and got to one website after
another
> which then lead to this website....
>
>
> http://us4.php.net/manual/en/function.mysqli-real-escape-string.php
>
> Now, I see the problem, the "i" was added to the word, "mysql"..... So,
> probably clicked on the wrong link somewhere because it is hard to read
the
> i after the l.....
>
> Scott F.
>
> "Justin Patrin" <papercrane@gmail.com> wrote in message
> news:432beae04063012487737859c@mail.gmail.com...
> > On Wed, 30 Jun 2004 15:41:42 -0400, Scott Fletcher <scott@abcoa.com>
> wrote:
> > >
> > > Bummer, mysql_escape_string() is available only in PHP 5 and up. I'm
> using
> > > PHP 4.3.1....
> >
> > I know that it's not. Where are you seeing that? According to the
manual:
> >
> > http://us3.php.net/manual/en/function.mysql-escape-string.php
> >
> > mysql_escape_string
> > (PHP 4 >= 4.0.3, PHP 5)
> >
> > >
> > > "Chris Shiflett" <shiflett@php.net> wrote in message
> > >
> > > news:20040630190125.10708.qmail@web52801.mail.yahoo.com...
> > >
> > >
> > > > --- Justin Patrin <papercrane@gmail.com> wrote:
> > > > > You also shouldn't need addslashes when putting it in.
quoteSmart()
> in
> > > > > PEAR::DB is a *much* better option.
> > > >
> > > > That's great for those who use PEAR::DB, but it's not very safe to
> argue
> > > > against addslashes() based on what's in a specific PEAR module.
> > > >
> > > > I would argue that something like mysql_escape_string() is better
than
> > > > addslashes(), so I agree with you for the most part anyway. :-) It
all
> > > > depends on what database is being used and how.
> > > >
> > > > Chris
> > > >
> > > > =====
> > > > Chris Shiflett - http://shiflett.org/
> > > >
> > > > PHP Security - O'Reilly
> > > > Coming Fall 2004
> > > > HTTP Developer's Handbook - Sams
> > > > http://httphandbook.org/
> > > > PHP Community Site
> > > > http://phpcommunity.org/
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > > !DSPAM:40e31590154591440146407!
> > >
> > >
> >
> >
> > --
> > paperCrane --Justin Patrin--