30 lines
No EOL
701 B
PHP
30 lines
No EOL
701 B
PHP
<?php
|
|
|
|
include("./access.php");
|
|
|
|
if(isset($_POST['cle'])&&($_POST['cle']!='')&&($_POST['nom']!=''))
|
|
{
|
|
|
|
$queradd = "UPDATE intervenants SET
|
|
nom='".addslashes($_POST['nom'])."',
|
|
prenom='".addslashes($_POST['prenom'])."',
|
|
mobile='".$_POST['mobile']."',
|
|
email='".$_POST['email']."'
|
|
WHERE cle='".$_POST['cle']."'";
|
|
$resultadd = mysqli_query($connect,$queradd);
|
|
|
|
|
|
}
|
|
elseif($_POST['nom']!='')
|
|
{
|
|
|
|
$queradd = "INSERT INTO intervenants SET
|
|
nom='".addslashes($_POST['nom'])."',
|
|
prenom='".addslashes($_POST['prenom'])."',
|
|
mobile='".$_POST['mobile']."',
|
|
email='".$_POST['email']."'";
|
|
$resultadd = mysqli_query($connect,$queradd);
|
|
}
|
|
|
|
header("location: index.php");
|
|
?>
|