Exemple #1
0
    $act = "a";
}
if (isset($_GET["act"])) {
    $act = $_GET["act"];
}
if ($act == "a") {
    themGH($id, $sl);
}
if ($act == "u") {
    capnhatGH($id, $sl);
}
if ($act == "d") {
    xoaGH($id);
}
if ($act == "tt") {
    dathang($gh, $hoten, $diachi, $email, $dt, $fax, $cty, $now);
}
hienthiGH($gh);
//========================
function themGH($id, $sl)
{
    global $gh;
    //echo "themGH($id, $sl)";
    if (isset($gh[$id])) {
        $gh[$id] = $gh[$id] + $sl;
    } else {
        $gh[$id] = $sl;
    }
    $_SESSION["gh"] = $gh;
}
function hienthiGH($gh)
Exemple #2
0
$anti=$_GET["anti"];*/
$act = "add";
if (isset($_GET["act"])) {
    $act = $_GET["act"];
}
if ($act == "add") {
    themGH($id, $sl);
}
if ($act == "update") {
    capnhatGH($id, $sl);
}
if ($act == "delete") {
    xoaGH($id);
}
if ($act == "tt") {
    dathang($gh, $hoten);
}
hienthiGH($gh);
//========================
function themGH($id, $sl)
{
    global $gh;
    //echo "themGH($id, $sl)";
    if (isset($gh[$id])) {
        $gh[$id] = $gh[$id] + $sl;
    } else {
        $gh[$id] = $sl;
    }
    $_SESSION["gh"] = $gh;
}
function hienthiGH($gh)