Beispiel #1
0
<?php

$id = $_GET['id'];
$sp = getsanpham($id);
if (isset($_POST['submit'])) {
    $ten = $_POST['ten'];
    $mota = $_POST['mota'];
    $gia = $_POST['gia'];
    if (isset($ten) && isset($mota) && isset($gia)) {
        sua($ten, $mota, $gia, $id);
        header('location:index.php');
    }
}
include 'view/sua.php';
?>
    
    
    
Beispiel #2
0
<?php

$id = $_GET['id'];
$sp = getsanpham($id);
if (isset($_POST['submit'])) {
    $ten = $_POST['ten'];
    $gia = $_POST['gia'];
    $mota = $_POST['mota'];
    $khuyenmai = $_POST['khuyenmai'];
    if (isset($ten) && isset($gia) && isset($mota) && isset($khuyenmai)) {
        sua($ten, $gia, $mota, $khuyenmai, $id);
        header('location:index.php');
    }
}
include 'view/sua.php';