NYCPHP Meetup

[nycphp-talk] PHP and MSIE 6.0

betenoir at echonyc.com betenoir at echonyc.com
Mon Feb 3 20:51:26 EST 2003


>--- betenoir at echonyc.com wrote:
>> After testing fairly thoroughly we have discovered that
>> IE6 is remarkably inconsistent in how it passes cookies
>> and form data from page to page.
>
>I'm not sure what inconsistencies you are speaking about,
>but perhaps your observations are related to third-party
>cookies from sites that are not P3P-compliant. I believe IE
>requires (by default) P3P compliance from third-party sites
>wishing to set a cookie.

Are you referring to having a privacy policy? We've done that.  But it's
not the third party that's setting the cookie. The problem is retrieving
the cookie that we set when we return to our domain *from* the third party.

>Maybe that helps explain something.
>
>> It is better at $_POST info but a long way from
>> reliable. It is less reliable when it comes to cookies.
>
>I am not sure what inconsistency you are noting with IE and
>form variables, but I expect that you will ultimately
>identify something in your code rather than in the browser.

I am prepared to accept that possibility. However we have had a probem that
when posting from form_input.php to review_form.php

In the former I've registered name, address, item_number.
<?
	session_register('name');
	session_register('address');
	session_register('item_number');
?>

And posted from a form
	<input type=text name=name>
	<input type=text name=address>
	<input type=text name=item_number>

to review_form.php

ON the review_form.php page I register the variables as above and create
the HTML as follows:

<?
	print  "$name <imput type=hidden name=\\"$name\\">";
	print  "$address <imput type=hidden name=\\"$address\\">";
	print  "$item_number <imput type=hidden name=\\"$item_number\\">";
?>

However  the variables do not appear (print) consistently even though there
is a javascript error-checking routine on the previous page.

And submitting the same page 5 minutes later on the same machine under
identical circumstances has produced different results.

>If you can reproduce your problem in a very small script
>that demonstrates the problem, we can probably help more.

The BIG problem is reading the cookie(s) that I am setting on the
review_form.php page.

	$postString = $_POST;
	$cC = 0;
	$N100D = "";
	$expiry = time() + 60 * 60 * 24 * 365;
	foreach ($postString as $key => $value) {

		if ($value != "") {
			$cienCenas = array ($key => $value);
			setcookie($key,$value,$expiry);
			$N100D = $N100D . $key . ",";
			$N100D = $N100D . $value . ",";
		}
	}

		setcookie('$ciento',$N100D,$expiry);

I have confirmed the value of $N100D by printing it on the review_form.php
page. But I am NOT always able to retrieve after returning from another
domain.

That is the core of the problem.  Previously I had used the
session_register method to "retrieve" them but discovered that it did not
work 100% of the time.

<?
	print  "$name <imput type=hidden name=\\"$name\\">";
	print  "$address <imput type=hidden name=\\"$address\\">";
	print  "$item_number <imput type=hidden name=\\"$item_number\\">";
?>

In fact in some cases it was only working 80% of the time -- which is
unacceptable.

Look forward to gaining the insight of the list.

Clyde






More information about the talk mailing list