Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
292 B
4
Indexable
Never
$upc = $_POST['upc'];
$name = $_POST['name'];

$sql = "INSERT INTO items (upc, name) VALUES ('$upc', '$name')";
if (isset($con)) {
    $nameCheck = mysqli_query($con, $sql) or die("Item creation failed");
    header('location: ../index.php');
} else {
    echo 'Connection failed';
}