RaffiqEddy
Programmer
Dear PHP Experts,
I have problem with hidden field contains quotes.
This is what I key-in in the text box:
" ~ ! @ # $ % ^ & * ( ) _ + ` - = | } { [ ] : ; ' ? > < , . / \
As u can see it’s all special characters.
To confirm what user has keyed-in, I display it and I stored it as a hidden field for the next process.
When I click submit button it automatically add slash to double/single quote, this solved my problem when I want to save the data into MySQL.
But the problem is, when I display the value, it shows like this:
Your text is:
\" ~ \\ ! @ # $ % ^ & * ( ) _ + ` - = | } { [ ] : ; \' ? > < , . /
<input type="hidden" name="test" value="\" ~ \\ ! @ # $ % ^ & * ( ) _ + ` - = | } { [ ] : ; \' ? > < , . /">
The code
Any Idea how to solve this problem??
TIA & Regards.
Ps: I used PHP 4.3.4 + MySQL 3.32
I have problem with hidden field contains quotes.
This is what I key-in in the text box:
" ~ ! @ # $ % ^ & * ( ) _ + ` - = | } { [ ] : ; ' ? > < , . / \
As u can see it’s all special characters.
To confirm what user has keyed-in, I display it and I stored it as a hidden field for the next process.
When I click submit button it automatically add slash to double/single quote, this solved my problem when I want to save the data into MySQL.
But the problem is, when I display the value, it shows like this:
Your text is:
\" ~ \\ ! @ # $ % ^ & * ( ) _ + ` - = | } { [ ] : ; \' ? > < , . /
<input type="hidden" name="test" value="\" ~ \\ ! @ # $ % ^ & * ( ) _ + ` - = | } { [ ] : ; \' ? > < , . /">
The code
Code:
<form name="form1" method="post" action="test.php">
<?
if(isset($_POST[Submit]))
{
echo "<strong>Your text is:</strong><br>".$_POST[tText]."<br><br>";
?>
<input type="hidden" name="test" value="<? echo $_POST[tText];?>"><br><br>
<?
}
?>
<input name="tText" type="text" id="tText">
<input type="submit" name="Submit" value="Submit">
</form>
Any Idea how to solve this problem??
TIA & Regards.
Ps: I used PHP 4.3.4 + MySQL 3.32