Reply to post data from a form and special character: " ' " and " / "

Your name:

Reply:


Posted by Paola on 10/10/14 11:25

Hi, my problem:

example:
-----
<form action="<?=$_SERVER['PHP_SELF']?>" method="post" name="form1">
<input type="text" value="<?echo ($postedTitle) OR (the content of the title
field in the database)?>" name="title"> <?= $err_msg?> //required field
<input type="text" value="<? echo ($postedMsg) OR (the content of the
message field in the database) ?>" name="title"> //no required field

<input type="submit" value="submit changes">
</form
/-----

After a submit, first of all I make a control on the required fields: "if"
the field is empty some error message will appear.. "else" the application
will update the record on the database.

THE PROBLEM: if the field is empty I need to show the form again, but all
the fields should be filled.. if they were changed before the submit.. with
the new text entered! As usual. BUT, if I have insert for example a " ' "
the field will be filled with " \' " ... IF " \ " then " \\ "
If I submit the form again and there are some more errors... \\ becomes \\\
and \\\\ and so on...

what is the best way.. without using javascript.. to remember the content of
a field?

Could some one help me, please? Thank you very much..

p.s. I'm sorry for my english is not perfect ;)


--
Paola

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация