dcass
asked on
Check for SSL
This is not working - can't figure out why.
If I try to change the header, I get an error.
If I try to echo the server variables, I get an error.
<?php
if($_SERVER["HTTPS"] != "on" || $_SERVER["SERVER_PORT"] != "443") {
?>
<script type="text/javascript">
document.forms[0].action=" https://www.xxxxxxxx.com/order.php";
document.forms[0].submit() ;
</script>
<?php
}
?>
and I tried this - no alert!
<script type="text/javascript">
var sValue = <?php $_SERVER["HTTPS"] ?>;
alert(sValue);
</script>
It's out on 123ehost, so I can't set or control a lot of things.
If I try to change the header, I get an error.
If I try to echo the server variables, I get an error.
<?php
if($_SERVER["HTTPS"] != "on" || $_SERVER["SERVER_PORT"] != "443") {
?>
<script type="text/javascript">
document.forms[0].action="
document.forms[0].submit()
</script>
<?php
}
?>
and I tried this - no alert!
<script type="text/javascript">
var sValue = <?php $_SERVER["HTTPS"] ?>;
alert(sValue);
</script>
It's out on 123ehost, so I can't set or control a lot of things.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER