gdebojyoti.mail96
Member
- Messages
- 89
- Reaction score
- 0
- Points
- 6
Hello,
I faced a problem while trying to use the $_POST command in PHP.
Whenever I am trying to receive a string which contains any of the characters ', ", \, the output character is accompanied by a \ character.
Input: He's known as Michael "Mickey" Brown. This is a \ character.
Output: He\'s known as Michael \"Mickey\" Brown. This is a \\ character.
---------- Post added at 12:03 PM ---------- Previous post was at 12:00 PM ----------
Please note that this problem did not arise when I was using the code in my computer's localhost (Wamp); it started when I uploaded the file in my x10hosting's account.
I faced a problem while trying to use the $_POST command in PHP.
Whenever I am trying to receive a string which contains any of the characters ', ", \, the output character is accompanied by a \ character.
Code:
<?php
$mystring=$_POST["mystring"];
echo $mystring;
?>
Input: He's known as Michael "Mickey" Brown. This is a \ character.
Output: He\'s known as Michael \"Mickey\" Brown. This is a \\ character.
---------- Post added at 12:03 PM ---------- Previous post was at 12:00 PM ----------
Please note that this problem did not arise when I was using the code in my computer's localhost (Wamp); it started when I uploaded the file in my x10hosting's account.