Page 1 of 1
Protocol HTTP to HTTPS
Posted: Wed Dec 17, 2003 10:43 pm
by Rogerio
Good morning the whole ones,
I am trying to use the protocol HTTPS even so I am not getting.
I am not getting to pass values of variables when I want to use this protocol.
Suggestions?
Rogério

Posted: Fri Dec 19, 2003 5:45 am
by twigletmac
How are you trying to pass the variables? Are you passing between http -> https or https -> https.
Mac
HTTP to HTTPS
Posted: Fri Dec 19, 2003 8:17 pm
by Rogerio
I am passing of HTTP for HTTPS as in the script below example:
Code: Select all
<?php ob_start(); ?>
<?php require_once('Connections/enegocios.php'); ?>
<?php
// *** Start the session
session_start();
// *** Validate request to log in to this site.
$FF_LoginAction = $HTTP_SERVER_VARS['PHP_SELF'];
if (isset($HTTP_SERVER_VARS['QUERY_STRING']) && $HTTP_SERVER_VARS['QUERY_STRING']!="") $FF_LoginAction .= "?".htmlentities($HTTP_SERVER_VARS['QUERY_STRING']);
if (isset($HTTP_POST_VARS['usuario'])) {
$FF_valUsername=$HTTP_POST_VARS['usuario'];
$FF_valPassword=$HTTP_POST_VARS['senha'];
$FF_fldUserAuthorization="";
$FF_redirectLoginSuccess="HTTP://cotacao.bighost.com.br/private/cotacao.php";
$FF_redirectLoginFailed="../public/aviso.php";
$FF_rsUser_Source="SELECT usu_chave, usu_password";
if ($FF_fldUserAuthorization != "") $FF_rsUser_Source .= "," . $FF_fldUserAuthorization;
$FF_rsUser_Source .= " FROM usuario WHERE usu_chave='" . $FF_valUsername . "' AND usu_password='" . $FF_valPassword . "'";
mysql_select_db($database_enegocios, $enegocios);
$FF_rsUser=mysql_query($FF_rsUser_Source, $enegocios) or die(mysql_error());
$row_FF_rsUser = mysql_fetch_assoc($FF_rsUser);
if(mysql_num_rows($FF_rsUser) > 0) {
// username and password match - this is a valid user
$MM_Username=$FF_valUsername;
$_SESSION['MM_Username'] = $MM_Username;
if ($FF_fldUserAuthorization != "") {
$MM_UserAuthorization=$row_FF_rsUser[$FF_fldUserAuthorization];
} else {
$MM_UserAuthorization="";
}
$_SESSION["MM_UserAuthorization"];
if (isset($accessdenied) && false) {
$FF_redirectLoginSuccess = $accessdenied;
}
mysql_free_result($FF_rsUser);
$_SESSION["FF_login_failed"];
$FF_login_failed = false;
header ("Location: $FF_redirectLoginSuccess");
exit;
}
mysql_free_result($FF_rsUser);
$_SESSION["FF_login_failed"];
$FF_login_failed = true;
header ("Location: $FF_redirectLoginFailed");
exit;
}
?>
<?php ob_end_flush(); ?>
[Admin Edit: added for readability][/b]
if you can help me!
at once I thank.
Posted: Mon Dec 22, 2003 5:12 am
by twigletmac
Are you trying to say that the session does not work when you move from HTTP to HTTPS?
Mac