NYCPHP Meetup

NYPHP.org

[nycphp-talk] MySQL/Flash/Apostrophe issue

P. Ju (朱漢璇) pjlists at pobox.com
Fri Dec 7 13:47:38 EST 2007


Hi Kristina,

PHP has a function to take care of this for you: mysql_escape_string

http://www.php.net/mysql_escape_string


PJ

On Dec 7, 2007 1:43 PM, Kristina Anderson <ka at kacomputerconsulting.com>
wrote:

> Yes it's definitely a flash issue.  I will replace the apostrophes in
> the strings with &#39; before database insert and let you know how
> that works!
>
> > Kristina Anderson wrote:
> > > The previous programmers neglected to properly handle apostrophes
> and
> > > there are many text strings displayed in the .swf files,
> unfortunately
> > > what exists now is that whenever an apostrophe occurs, it cuts off
> the
> > > rest of the string.
> > >
> > > One thing that I tried was to go into the MySQL database itself
> and
> > > add the escape character before the apostrophes, this resulted in
> the
> > > display of the encoded HTML for the apostrophe and not the actual
> > > apostrophe.
> > >
> > >
> >
> > Well, it sounds like the apostrophe was properly escaped when placed
> > into the MySQL database.  If it is escaped, it doesn't store the
> escape
> > charector in the database, it stores it as it is.
> >
> > What I'm guessing you need to do is escape/convert the apostrophe
> for
> > Flash/Actionscript.
> >
> > At a guess, since Flash is so HTML centric, try converting the ' to
> &#39;
> >
> > _______________________________________________
> > New York PHP Community Talk Mailing List
> > http://lists.nyphp.org/mailman/listinfo/talk
> >
> > NYPHPCon 2006 Presentations Online
> > http://www.nyphpcon.com
> >
> > Show Your Participation in New York PHP
> > http://www.nyphp.org/show_participation.php
> >
> >
>
> -------------------
> Kristina D. H. Anderson
> Senior Application Developer/Consultant
> "Building a Better Tomorrow, One Line of Code at a Time"
> 646-247-4987
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>



-- 
Patricia Ju
phj at pobox.com
+1-646-717-3871

success = fn(perseverance)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20071207/013dd155/attachment.html>


More information about the talk mailing list