prog/boffice/add_referent.php

26 lines
543 B
PHP
Raw Permalink 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 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");
?>