How to correctly save HTML content in the MYSQL table using PHP. I used the following functions of PHP but no luck.
$encodedHTML = htmlspecialchars($cs_htmlEditor);
$encodedHTML = urlencode($cs_htmlEditor);
You can try base64_encode and base64_decode , your column data type should be BLOB.
To encode data in base64
$encodedHTML = base64_encode($cs_htmlEditor);
To retrieve the data
$decodedHTML = base64_decode($cs_htmlEditor)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.