This is really odd and it seems to affect the Win32 version of PHP5.2.8 running on Windows 2003 and IIS6.
But the echo returns:
session Variables on Index2.php and $_SESSION[$_compID]=Viva Verde Imoveis, $_SESSION[$_compname]=Viva Verde Imoveis.
When it should be:
session Variables on Index2.php and $_SESSION[$_compID]="6", $_SESSION[$_compname]=Viva Verde Imoveis.
How can I fix this?
AL Almeida
CIO
May all those that come behind us, find us faithful
Code:
require_once('Connections/MySQLDb.php');
if (!isset($_SESSION)) {
session_start();
session_register($_compname);
session_register($_compID);
}
$MM_Company_rs_company = "/viva-verde/index2.php";
if (isset($_SERVER['HTTP_HOST'])) {
$MM_Company_rs_company = $_SERVER['HTTP_HOST'];
}
mysql_select_db($database_ajmedia, $ajmedia);
$query_rs_company = sprintf("SELECT tbl_company.Comp_ID, tbl_company.Comp_Name FROM tbl_company WHERE tbl_company.Comp_URL = %s", GetSQLValueString($MM_Company_rs_company, "text"));
$rs_company = mysql_query($query_rs_company, $ajmedia) or die(mysql_error());
$row_rs_company = mysql_fetch_assoc($rs_company);
$totalRows_rs_company = mysql_num_rows($rs_company);
var_dump($row_rs_company);
$_SESSION[$_compID] = $row_rs_company['Comp_ID'];
$_SESSION[$_compname] = $row_rs_company['Comp_Name'];
echo '<br /> session Variables on Index2.php and $_SESSION[$_compID]='. $_SESSION[$_compID] .', $_SESSION[$_compname]=' . $_SESSION[$_compname].'.'
The var_dump($row_rs_company) returns:
array(2) { ["Comp_ID"]=> string(1) "6" ["Comp_Name"]=> string(18) "Viva Verde Imoveis" }
But the echo returns:
session Variables on Index2.php and $_SESSION[$_compID]=Viva Verde Imoveis, $_SESSION[$_compname]=Viva Verde Imoveis.
When it should be:
session Variables on Index2.php and $_SESSION[$_compID]="6", $_SESSION[$_compname]=Viva Verde Imoveis.
How can I fix this?
AL Almeida
CIO
May all those that come behind us, find us faithful