Page 2 of 2

Re: TRouble with quotes and double quotes

Posted: Mon Jan 27, 2014 10:21 pm
by phper2014
Do you have it solved?

The result I have from your script is:

Code: Select all

<form action="test.php" method="post">
name=it's 1".<br><input type="submit" name="go" value="Submit">
</form>
I'm not sure what your intended result is but I can not see where the [name=it's 1".] should be used. What is this scripts purpose? Is the result [name=it's 1".] a statement to the user? What should this script do and the exact result you need?

I see your use of htmlspecialchars() but I do not see why its being used for this instance, if there is only 1 value to convert you can just exchange the known value, so I'm not seeing what it is you are trying to do in this instance. More details please and I will help you figure it out.

Re: TRouble with quotes and double quotes

Posted: Mon Jan 27, 2014 10:36 pm
by phper2014
This is the result I found with your script. I do not see exactly it is you want the result to be. The use of htmlspecialchars() is not what you want to use in this script. Are you trying to amend the HTML form after its submitted? If so what is the exact required result from this script, what is it intended to do? Is it part of another script, I don't have enough information to help you with this yet. More details please.

Code: Select all

<form action="test.php" method="post">
name=it's 1".<br><input type="submit" name="go" value="Submit">
</form>