html - Best way of posting values in a form which contains a single quote -


When I submit an apostrophe value, 2 apoprophs are returned.

If you print $ '_POST [' surname '], the text is entered into the text box. See O'Rourke.

This code is

  & lt; Php print_r ($ _POST); ? & Gt; & Lt; Form method = post operation = & lt ;? Php echo $ _SERVER ["PHP_SELF"]? & Gt; & Gt; Surname & lt; Input type = 'text' name = 'alias' value = '' / / gt; & Lt; Input type = 'submit' value = 'register' & gt; & Lt; / Form & gt;  

What is the best way to stop this? I can obviously replace a string, but is there a better way? For example, instead of action, there is a way to stop it in this form.

Please note that there is nothing with MySQL in it.

Please also keep in mind that the output of the value is still being printed in O''Rourke by Hibernity. My use code is shown below.

  & lt; Form method = post action = & lt; Php echo $ _SERVER ["PHP_SELF"]? & Gt; & Gt; Surname & lt; Input type = 'text' name = 'surname' value = "& lt ;? php echo hualities (" orrk ")? & Gt; /> & Lt; Input type = 'submit' value = 'submit' & gt; & Lt; / Form & gt;  

I'm not sure that it will be helpful in any way when a user enters text in the text box and submits the hit. Sorry if I have been misunderstood how to use the pledge.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -