On Wednesday 14 July 2004 04:57, Jamie wrote:
> The code im using to test is:
> if ($_SERVER["HTTPS"] == "off")
> {
> print "We are not using HTTPS";
> }
> else
> {
> print "We are using HTTPS";
> }
>
>
> On my windows machine it works as expected with it displaying the correct
> message when using https and http. When i use my linux box it constantly
> displays "We are using HTTPS" what means the statement is evaluating as
> false. When it should be true (as im currently viewing the page off a HTTP
> connection)You want to specifically check for $_SERVER["HTTPS"] == "on" because if you're not using HTTPS then $_SERVER["HTTPS"] does not exist. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* "If the code and the comments disagree, then both are probably wrong." -- Norm Schryer */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

