Hi Karl,
:-) This is exactly what I did in the first mail, or do I miss something??
Original:
function stringToMysqlFormat($original_input) {
//for inserting the data with special characters INTO mysql
$html_encoded =
htmlentities(mysql_real_escape_string($original_input));
return $html_encoded;
}
function mysqlToHTMLFormat($encoded) {
//for displaying the data FROM mysql
$html_decoded = html_entity_decode(stripslashes($encoded));
return $html_decoded;
}
Best regards,
Cor
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Karl
DeSaulniers
Sent: woensdag 8 augustus 2012 9:02
To: Flash Coders List
Subject: Re: [Flashcoders] HTML in Datagrid component
Ooh Sry, brain fart.. :P
Try this..
function stringToMysqlFormat($original_input) {
//for inserting the data INTO mysql
$my_string =
html_entities(mysql_real_escape_string($original_input));
return $my_string;
}
function mysqlToHTMLFormat($encoded) {
//for echoing the data FROM mysql
$my_html = html_entity_decode(stripslashes($encoded));
return $my_html;
}
Not that it matters all the time, but I stay away from php variables that
are the same name as a code in any other lang. IE String or HTML.
Just forgot as I was writing last time. Damn auto-pilot. :)
HTH,
Best,
Karl
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2197 / Virus Database: 2437/5185 - Release Date: 08/07/12
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders