1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
<?php
$servername = "localhost";
$database = "philippe";
$username = "root";
$password = "";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $database);
// Check connection
mysqli_close($conn);
$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,$datedepart,$datearrive,0,0)";
try {$conn->query($req);} catch (Exception $e) {$e->getMessage();}
echo 'Success';
// ceci fonction dans php myadmin.
// INSERT INTO `orders` (`order_number`, `conducteur`, `lieudepart`, `lieuarrive`, `participation`, `datedepart`, `datearrive`, `idtrajet`, `idmembre`) VALUES (NULL, 'Philippe', 'Paris', 'Limoge', '50', '2022-08-15 12:31:27.000000', '2022-08-31 14:31:27', '0', '0'); |
Partager