FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » str_replace ?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: str_replace ? [message #183356 is a reply to message #183349] Mon, 21 October 2013 01:06 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 10/20/2013 8:48 PM, richard wrote:
> In my database I am noting that none of the song names containing a single
> quote are being written.
> If I use str_replace, how exactly should I write it?
>
> The php manual is not all that clear.
> http://php.net/manual/en/function.str-replace.php
>
> e.g.
>
> Name of song is "I'm Sorry".
>
> $song=str_replace($song,"'%");
>

As you've been told may times before. ALL strings used in accessing ANY
SQL database need to be escaped.

You're not doing that.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: has anyone used multithreaded PHP appserver.io for application?
Next Topic: Observation
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 15:35:19 GMT 2024

Total time taken to generate the page: 0.05415 seconds