Bonjour à tous.
Merci pour votre aide.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
 
$servername = "localhost";
$database = "philippe";
$username = "root";
$password = "";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $database);
// Check connection
mysqli_close($conn);
// session_start();
 
// if(isset($_POST["conducteur"], $_POST["lieudepart"], $_POST["lieuarrive"],$_POST["participation"],$_POST["debutActivite"], $_POST["finActivite"] )) {
 
 
    $conducteur = htmlspecialchars( $_POST['conducteur']) ;
    $lieudepart = htmlspecialchars( $_POST['lieudepart']);
    $lieuarrive = htmlspecialchars( $_POST['lieuarrive']);
    $participation = htmlspecialchars( $_POST['participation']);
    $datedepart = htmlspecialchars( $_POST['$datedepart']);
    $datearrive = htmlspecialchars( $_POST['$datearrive']);
 
    $datedepart = date('Y/m/d', strtotime($datedepart));
    $datearrive = date('Y/m/d', strtotime($datearrive));
 
 
    $conn = mysqli_connect('127.0.0.1', 'root', '', 'philippe');
 
 
$req = " INSERT INTO `orders` (`order_number`, `conducteur`, `lieudepart`, `lieuarrive`, `participation`, `datedepart`, `datearrive`,' 
idtrajet', 'idmembre') VALUES (NULL,'$conducteur','$lieudepart','$lieuarrive','$participation','$debutActivite','$finActivite',0,0)";
try {$conn->query($req);} catch (Exception $e) {$e->getMessage();}
echo 'Success';
Ca ne fontionne pas malgres un copier coller d'un INSERT avec PHPMYSL