prog/boffice/add_lieu.php

24 lines
469 B
PHP
Raw Normal View History

2020-11-11 13:19:45 +00:00
<?php
include("./access.php");
if(isset($_POST['cle'])&&($_POST['cle']!='')&&($_POST['nom']!=''))
{
$queradd = "UPDATE lieux SET
nom='".addslashes($_POST['nom'])."'
WHERE cle='".$_POST['cle']."'";
$resultadd = mysqli_query($connect,$queradd);
}
elseif($_POST['nom']!='')
{
$queradd = "INSERT INTO lieux SET
nom='".addslashes($_POST['nom'])."'";
$resultadd = mysqli_query($connect,$queradd);
}
header("location: index.php");
?>