You are here: Re: 2 small Q's about mysql_real_escape_string() « PHP Programming Language « IT news, forums, messages
Re: 2 small Q's about mysql_real_escape_string()

Posted by frizzle on 11/06/22 11:31

Andy Hassall wrote:
> On 8 Nov 2005 07:15:33 -0800, "frizzle" <phpfrizzle@gmail.com> wrote:
>
> >Hmm,
> >somehow i can't get it to work correctly:
> >
> >I tested inserting the following text:
> >'"\ (single quote, double quote, backslash)
> >
> >Via PHP:
> > $new_var = mysql_real_escape_string($_POST['var']);
> > $put_info = mysql_query("INSERT INTO `test` ( `id` , `text` )
> >VALUES ('', '".$new_var."');");
>
> Print out all the values involved to the browser so you can actually see what
> is happening.
>
> In my previous reply that you haven't quoted, I said:
>
> >>Nothing's automatically converted, unless you have the dreaded
> >>magic_quotes option turned on.
>
> So, do you have magic_quotes turned on? If you don't know, use Google to find
> out what it is. There is a chapter in the PHP manual about it.
> --
> Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
> http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

Sorry for not quoting, i only recently discovered where this option is
in
Google-groups...
Anyway, i checked the server's settings, and concerning magic quotes,
it
said the following:

magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off

Thanks!

Frizzle.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация