Input ++90 causing problems
| From: | ioannes | Date: | Thu, 13 Jan 2005 23:13:50 +0000 |
| Subject: | Input ++90 causing problems | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-38139@lists.php.net to get a copy of this message | ||
It appears that the code below in short has the following problematic strings:
++90 ++90-212- gives ﯝ ﯝ212- on my test page below: error2.htm. A clue might be that a search
on google turns up Arabic unicode, and the input here was done in Turkey. check the link: http://www.londonriverside.co.uk/error2.htm
and let me know if it appears the same to you or is a function of my computer, which includes
Japanese libraries. (In order to send this message I need to choose unicode formatting.)
++90 ++90 gives ++90 ++90 on error3.htm - and is correct
The string ++90 came from a web input form, where someone was putting in their phone number. It was
stored in a database and retrieved onto a web page, all using php, on which page it screwed up the
css and caused unusual javascript errors. Although when the same person input the same phone number
on the same form again, the same problem did not occur all the time but did re-occur at least twice.
I cut down the HTML and finally found these few figures seemed to be the cause, though if I used my
HTML editor to applyt auto-formatting to the page the error did not occur. Also if I simply deleted
the ++90 characters and typed them in again and uploaded that, there were no errors. Confusingly,
href links to other pages requiring a query to be run on the same record in the database - although
it does not require to retrieve and show the phone number on the htm page but does use the index
reference of the record - fails to retrieve any information for the record, eg my dates just default
to 01/01/1970 erroneously and other info is retrieved on the record, in this case there is no css
problem or javascript error in the static HTML, just no data to show within the page. Also note
that when I get into the table and cut and paste all the info to a new record, the new record works
- ie I can retrieve it with same tel numbers and everything works.
Is there something about this string ++90 that is problematic, possibly in relation to being sent
from an internet form initially? If it's simply a familiar error from Arabic unicode perhaps I
should be filtering this out on all input pages? are there other such problematic strings? what am I
searching for if I search for good input filtering for web input forms?
John
I did the following test pages:
error2.htm:
<html>
<head>
<title>test</title>
<LINK href="styles/test.css" type=text/css rel=stylesheet>
</head>
<body text="#000000" leftmargin="0" topmargin="0"
marginwidth="0" marginheight="0" bgcolor="#ffffff">
<table width="1000" border="1" cellspacing="0"
cellpadding="0">
<tr><td class=textset3 colspan=12>
++90 ++90-212-
</td></tr></table>
</body>
</html>
error3.htm:
<html>
<head>
<title>test</title>
<LINK href="styles/enquiries_css.css" type=text/css rel=stylesheet>
</head>
<body text="#000000" leftmargin="0" topmargin="0"
marginwidth="0" marginheight="0" bgcolor="#ffffff">
<table width="1000" border="1" cellspacing="0"
cellpadding="0">
<tr><td class=textset3 colspan=12>
++90 ++90
</td></tr></table>
</body>
</html>