I have a html form where visitors can fill and send me some information, as an e-mail. It sends like this:
$body = print_r($_POST, true);
mail ($to, $subject, $body, $headers);
When they write abc'def I get abc\'def
What is this additional \? How I can prevent it?
...
Does anyone know of a free website or program which will take a string and render it quoted with the appropriate escape characters?
Let's say, for instance, that I want to quote
It's often said that "devs don't know how to quote nested "quoted strings"".
And I would like to specify whether that gets enclosed in single or double quo...
Hi folks, I've got a PHP script that is reading in some JSON data provided by a client. The JSON data provided had a single 'smart quote' in it.
Example:
{
"title" : "Lorem Ipsum’s Dolar"
}
In my script I'm using a small function to get the json data:
public function getJson($url) {
$filePath = $url;
$fh = fopen...
I disabled magic_quotes in my php.ini.
But I still get escaped strings in my form.
Note: I'm running this in a theme in Wordpress.
...
Hi there,
I have a site, locally setup. It's application development framework is Kohana.
I have an error displaying the following:
Unknown Error
An error was detected which prevented the loading of this page. If this problem persists, please contact the website administrator.
system/core/Kohana.php [98]:
Function set_magic_quotes...
I have a PHP installation running 5.3.3 and when I use the code below:
$sql = file('sql.txt');
var_dump($sql);
All my single quotes are escaped. Why would this be happening. Magic quotes is enabled on the server (for some reason, it is out of my control) however I thought that magic quotes was only applied to GET POST COOKIE...