Example #1
1
<?php

include "lib/lib.inc.php";
//підключення бібліотеки
include "constants.php";
//костанти для підключення до сервева MySQL
$title = $_GET['title'];
$q = clearInt($_GET['quantity']);
add2Basket($title, $q);
header("Location: {$_SERVER['HTTP_REFERER']}");
exit;
Example #2
0
<?php

// подключение библиотек
require "inc/lib.inc.php";
require "inc/db.inc.php";
$id = clearInt($_GET['id']);
$quantity = 1;
add2Basket($id, $quantity);
header('Location: catalog.php');
exit;
Example #3
0
<?php

require "inc/lib.inc.php";
require "inc/db.inc.php";
if (!empty($_GET["id"])) {
    $id = $_GET["id"] * 1;
    if ($id and isExistsId($id)) {
        add2Basket($id);
    }
}
header("Location: catalog.php");