Ahoj,
kvůli přechodu z 5,3 php na vyšší php 5,6 mi přestali stránky vyčítat data z databáze, po několika pokusech o nápravu se mi stále nedaří je zprovoznit. Dokázal by mi někdo říci jak upravit zdroják níže, aby zase fungovaly?
Předem díky.
<?
header("Expires: ".GMdate("D,d M Y H:i:s")."GMT");
header ("Cache-Control: no-cache");
header ("Pragma: no-cache");
session_start();
include("phpdata.php");
include ("navigace.php");
$obj = new databaze;
$obj->connect();
$obj->select_db("h_odborydpo_cz");
$set = @mysql_query ("SET NAMES cp1250");
$menu=0;
if ( $logout == "true" )
{
unset($_SESSION["sess_stat"]);
unset($_SESSION["sess_id"]);
unset($_SESSION["sess_fa_jmeno"]);
unset($_SESSION["sess_fa_ulice"]);
unset($_SESSION["sess_fa_mesto"]);
unset($_SESSION["sess_fa_psc"]);
unset($_SESSION["sess_do_jmeno"]);
unset($_SESSION["sess_do_ulice"]);
unset($_SESSION["sess_do_mesto"]);
unset($_SESSION["sess_do_psc"]);
unset($_SESSION["sess_email"]);
unset($_SESSION["sess_telefon"]);
unset($_SESSION["sess_firma"]);
unset($_SESSION["sess_ico"]);
unset($_SESSION["sess_dic"]);
}
if ( $prihlaseni == "true" )
{
$s = MySQL_Query("SELECT * FROM zakaznici WHERE login = '$login' && password = '$password'");
$pocet = MySQL_Num_Rows($s);
if ( $pocet >0 )
{
$data = MySQL_Fetch_Array($s);
$sess_stat = "true";
$sess_id = $data["id"];
session_register("sess_stat");
session_register("sess_id");
session_register("sess_login");
session_register("sess_password");
session_register("sess_fa_jmeno");
session_register("sess_stat");
session_register("sess_fa_jmeno");
session_register("sess_fa_ulice");
session_register("sess_fa_mesto");
session_register("sess_fa_psc");
session_register("sess_do_jmeno");
session_register("sess_do_ulice");
session_register("sess_do_mesto");
session_register("sess_do_psc");
session_register("sess_email");
session_register("sess_telefon");
session_register("sess_firma");
session_register("sess_ico");
session_register("sess_dic");
$sess_stat = "true";
$sess_id = $data["id"];
$sess_login = $data["login"];
$sess_password = $data["password"];
$sess_fa_jmeno = $data["fa_jmeno"];
$sess_fa_ulice = $data["fa_ulice"];
$sess_fa_mesto = $data["fa_mesto"];
$sess_fa_psc = $data["fa_psc"];
$sess_do_jmeno = $data["do_jmeno"];
$sess_do_ulice = $data["do_ulice"];
$sess_do_mesto = $data["do_mesto"];
$sess_do_psc = $data["do_psc"];
$sess_email = $data["email"];
$sess_telefon = $data["telefon"];
$sess_firma = $data["firma"];
$sess_ico = $data["ico"];
$sess_dic = $data["dic"];
}
else
{
$error = "Chybně zadané jméno nebo heslo!";
}
}
if($_SESSION["sess_stat"] == "true") $user = htmlspecialchars($_SESSION["sess_login"]);
else $user = "";
$sql = MySQL_Query("SELECT * FROM barvy WHERE id = '1'");
$barva = MySQL_Fetch_Array($sql);
?>