Page 2 of 2

Posted: Thu Aug 02, 2007 6:25 pm
by nathanr
out of interest.. could you post the version number of netscape you are using

and.. what happens if you simply create an html document with the source output you posted, does netscape still render the string with the # in it?

lastly.. it would be good to see the http response headers, that way we should be able to get a full grip of exactly what is causing the error.

Posted: Thu Aug 02, 2007 6:27 pm
by RobertGonzalez
webmeister wrote:
Everah wrote:Now t try this and see what comes of it:

Code: Select all

<?php
echo '&x=7&y=12';
echo '<br />';
echo urlencode('&x=7&y=12');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
&x=7&y=12<br />%26x%3D7%26y%3D12
</body>
</html>
So you could use the first of those options to output to the screen, if that is what you are doing. In fact, if you are constructing a URL, you could do that too.

Posted: Thu Aug 02, 2007 7:50 pm
by webmeister
VladSun wrote:
webmeister wrote:I also used a network sniffer so I know the php is sending what it's supposed to. I guess netscape inserts the '#' between the '&' and a 'x'; I just don't understand why. Must be a netscape thing!
Maybe because & is special symbol - it marks the begining of HTML entity. And a hex value HTML entity looks like:
&#x31; (that is for '1')
Could be. but it only happens in netscape or at least it doesn't happen in internet explorer.
Thanks for your time.