prog/boffice/add_referent.php
2020-11-11 14:19:45 +01:00

26 lines
No EOL
543 B
PHP

<?php
include("./access.php");
if(isset($_POST['cle'])&&($_POST['cle']!='')&&($_POST['nom']!=''))
{
$queradd = "UPDATE referents SET
nom='".addslashes($_POST['nom'])."',
mobile='".$_POST['mobile']."'
WHERE cle='".$_POST['cle']."'";
$resultadd = mysqli_query($connect,$queradd);
}
elseif($_POST['nom']!='')
{
$queradd = "INSERT INTO referents SET
nom='".addslashes($_POST['nom'])."',
mobile='".$_POST['mobile']."'";
$resultadd = mysqli_query($connect,$queradd);
}
header("location: index.php");
?>