Commit 38f60769 authored by Cedrick Copol's avatar Cedrick Copol

signalement mis a jour

parent 62156a26
Pipeline #248 failed with stage
in 1 second
<?php
// mysql -uledoc -p
// create table personne(nom TEXT, prenom TEXT, description TEXT, FULLTEXT(nom,prenom)) ENGINE=MyISAM;
// quit
header("Content-Type: application/json; charset=UTF-8");
if(isset($_POST['request']))
if(isset($_POST['request']) && $_POST['request'] != "" )
{
$servername = "localhost";
$username = "ledoc";
......
......@@ -2,7 +2,7 @@
<?php
header('Location: ../index.html');
$lines = file('../mac');
$lines = file('../../mac');
foreach($lines as $line)
{
$MAC = trim($line);
......@@ -33,12 +33,14 @@ if ($conn->connect_error) {
//$sql = 'INSERT INTO personne (nom, prenom, quartier, description, lieu)
//VALUES ("'.mb_strtolower($_POST['nom']). '","' .mb_strtolower($_POST['prenom']). '","quartier","' .mb_strtolower($_POST['description']). '","quartier'.'")';
$sql = 'INSERT INTO `personne` (`nom`,`prenom`,`quartier`,`description`,`lieu`)
$sql = 'INSERT INTO `personne` (`nom`,`prenom`,`quartier`,`description`,`lieu`,`heure`,`mac`)
VALUES
("'.strtolower($_POST['nom']).'" ,
"'.strtolower($_POST['prenom']).'" ,
"VIDE" ,
("'.$_POST['nom'].'" ,
"'.$_POST['prenom'].'" ,
"quartier",
"'.strtolower($_POST['description']).'" ,
"16.250418, -61.586514" ,
"'.date("Ymd-H:i:s").'",
"'.$MAC.'")';
if ($conn->query($sql) === TRUE) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment