<?php function ForceHTTPS() { if( $_SERVER['HTTPS'] != "on" ) { $new_url = "https://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; header("Location: $new_url"); exit; } } ?> Correct me if part of this doesn't work right. I've always used *nix based servers for PHP, so I might not be aware of certain windows limitations. Thanks. Uili - e-info(at)tunenami.com 25-Oct-2006 06:34 Andy Staudacher may have addressed this in his bug fix but just for clarifacation when reading a cookie $_COOKIE reads only the most accurate domain including sub domain. If you have cookies for .bar.com and foo.bar.com and the user is at foo.bar.com $_COOKIE only returns the cookie data from foo.bar.com but if the user is at www.bar.com the data from .bar.com will be read if there is no cookie for www.bar.com. dlyaza aT yahoo DOT com 23-Oct-2006 03:33 Get Real IP Address; If some one Know More than below, let us to see if (getenv('HTTP_CLIENT_IP')) { $IP = getenv('HTTP_CLIENT_IP'); } elseif (getenv('HTTP_X_FORWARDED_FOR')) { $IP = getenv('HTTP_X_FORWARDED_FOR'); } elseif (getenv('HTTP_X_FORWARDED')) { $IP = getenv('HTTP_X_FORWARDED'); } elseif (getenv('HTTP_FORWARDED_FOR')) { $IP = getenv('HTTP_FORWARDED_FOR'); } elseif (getenv('HTTP_FORWARDED')) { $IP = getenv('HTTP_FORWARDED'); } else { $IP = $_SERVER['REMOTE_ADDR']; } seanhickey at gmail dot com 20-Sep-2006 05:46 Note that class objects will not be in the $GLOBALS array until *after* the classe's constructor returns. <?php class A { public function __construct() { var_dump($GLOBALS); } } $a = new A; var_dump($GLOBALS); ?> The first var_dump() inside the __construct() method will not contain the value of $a, while the second one will. Alexander Hars 19-Sep-2006 05:16 If you want to use a form with multiple checkboxes (e.g. one per row) and assign the same name to each checkbox then the name needs to end with []. This tells PHP to put all checked values into an array variable. For example: <input type="checkbox" name="id[]" value="value_1"> <input type="checkbox" name="id[]" value="value_2"> .. <input type="checkbox" name="id[]" value="value_x"> |