Re: html special character in the when submit form



weetat.yeo@xxxxxxxxx wrote:

I have a form that allow user to enter description , sometimes the
description value have html special character for example %20 and etc.

Inserting into the mysql database is ok , for example the description
in my table is 'wt%20%20'.

However . when i have href link which for instance
'../edit/id=wt%20%20' .

The mysql database cannot find the id in the table eventhough it
existed in the table.

%20 in a URL path means a space. To use a percent sign as data,
percent-encode it as %25.

.../edit/id=wt%2520%2520

--
Jock

.



Relevant Pages

  • Re: Simple security question
    ... The information is uploaded to a mysql database ... Do NOT apply htmlspecialchars before inserting into DB. ... applying htmlspecialchars before DB insertion, ...
    (comp.lang.php)
  • Re: excel or word and PHP/mysql
    ... >> inserted into MYSQL database? ... > before inserting and stripslashessome time between retrieval and ... You shouldn't do a stripslashes() on data retrieved from MySQL. ... slashes so that the syntax of the INSERT or UPDATE query is correct. ...
    (alt.php)
  • Re: New lines from php to mysql
    ... > but I am unsure how to prepare data before inserting ... mysql_escape_stringbefore you add text to your MySQL database. ... quotes or double quotes. ...
    (comp.lang.php)
  • Re: Escaping characters in MySQLdb query
    ... >>I wrote a little script that is inserting thousands of records into a ... >>mysql database. ... >>How do I escape characters like ' in my insert statements? ... > IIUC this is a SQL question. ...
    (comp.lang.python)
  • html special character in the when submit form
    ... description value have html special character for example %20 and etc. ... Inserting into the mysql database is ok, ...
    (comp.lang.php)