This code works fine on Win NT/IIS with Netscape but not with IE4 :
cookie is not set ?????

<?php
  include "include.php";

  if (authUser($username,$userpass)) {
    // do not work with  IIS
    //$exp  = gmdate ("M d Y H:i:s", time()-3600);

//setcookie("AUTHORIZER",$username.":".md5($username.$userpass),$exp."
GMT");

    $exp = gmdate("M d Y H:i:s", time()+86400)." GMT";
    print "<script language='javascript'>";
    print "var expdate=new Date ();";
    print "expdate.setTime(expdate.getTime()+(24*60*60*1000*31));";
    print
"document.cookie='MYCOOKIE='+escape('".$username.":".md5($username.$userpass)."')
+';expires=expires '+expdate.toGMTString();";
    print "</script>";
  }
  //not header behind print
  //header("Location: $HTTP_REFERER");

  print "<script language='javascript'>";
  print "document.location='$HTTP_REFERER';";
  print "</script>";
?

$HTTP_COOKIE_VARS['MYCOOKIE'] is always empty in $HTTP_REFERER and this
only with IE 4/5

Help !!!!!!!



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to