I'm new to PHP and can use some help with avoiding HTML entity
trouble.
I've got a page which creates a hyperlink as follows:
printf('<a href="%s?txtFil ter=%s">%s</a>', $_SERVER['PHP_SELF'],
$txtFilter, $text);
Let's say that the value of $txtFilter is:
directory LIKE '%data1/%'
Clicking on this link takes me to this page:
http://www.mydomain.co m/dspItem.php?txt Filter=director y%20LIKE%20'%da ta1/%'
I then display the value of the URL variable $txtFilter in an HTML
text field:
printf("Filter: <input type='text' name='txtFilter ' value='%s'>",
htmlspecialchar s($txtFilter, ENT_QUOTES));
The problem is that it is displayed in the text field as
dir LIKE 'Uta1/%'
where the U has an acute accent. The "%da" is being displayed as an
acute-accented U.
Thanks.
-David
trouble.
I've got a page which creates a hyperlink as follows:
printf('<a href="%s?txtFil ter=%s">%s</a>', $_SERVER['PHP_SELF'],
$txtFilter, $text);
Let's say that the value of $txtFilter is:
directory LIKE '%data1/%'
Clicking on this link takes me to this page:
http://www.mydomain.co m/dspItem.php?txt Filter=director y%20LIKE%20'%da ta1/%'
I then display the value of the URL variable $txtFilter in an HTML
text field:
printf("Filter: <input type='text' name='txtFilter ' value='%s'>",
htmlspecialchar s($txtFilter, ENT_QUOTES));
The problem is that it is displayed in the text field as
dir LIKE 'Uta1/%'
where the U has an acute accent. The "%da" is being displayed as an
acute-accented U.
Thanks.
-David
Comment