[FX.php List] Displaying & Updating comments

Derrick Fogle derrick at fogles.net
Fri Jul 21 14:41:54 MDT 2006


PHP has a setting - MagicQuotes - that automatically escapes all  
characters that need escaped, like quotes, apostrophes, and of course  
the backslash, which is the escape character. By default it is on,  
because those characters need to be escaped when putting the data  
into most SQL databases (MySQL, PostgreSQL, etc.). You can turn of  
MagicQuotes in your php.ini file, or use the PHP function stripslashes 
() on variables when sending values to the database.


On Jul 21, 2006, at 3:36 PM, Erik Andreas Cayré wrote:

>
> Den 18/07/2006 kl. 19.29 skrev AC:
>
>> If the user types
>> a'a"a\a
>> into the comment field, then the database will contain the text
>> a\'a\"a\\a
>
> When I started with FX.php, I had some problems which were similar  
> to the ones you describe here.
>
> After a while I got a suggestion to use UTF-8 in my web page, and  
> all trouble just *disappeared*
> I didn't have to do any conversion at all between user input and  
> database contents...
>
> I'm not certain this pertains to you but it's worth a try?
>
> Like this:
>
> 	<meta http-equiv="content-type" content="text/html; charset=utf-8">
>
>
> ---
> Erik Andreas Cayré
> Spangsbjerg Møllevej 169
> DK-6705 Esbjerg Ø
>
> Home Tel: +45 75150512
> Mobile: +45 40161183
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list


Derrick Fogle
derrick at fogles.net





More information about the FX.php_List mailing list