districts
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
$dbFilename="../db/locations.db";
|
||||
require_once("../config.db.php");
|
||||
require_once("../config.php");
|
||||
require_once("../lib/functions.php");
|
||||
@@ -16,6 +15,7 @@ $numTopic = (isset($_POST['topic'])) ? $_POST['topic'] : 1;
|
||||
$numDefect = (isset($_POST['defect'])) ? $_POST['defect'] : 0;
|
||||
$numLng = $_POST['lng'];
|
||||
$numLat = $_POST['lat'];
|
||||
$strDistrict = $_POST['district'];
|
||||
$boolUploadOk=false;
|
||||
|
||||
if ($boolUpload && !empty($_FILES['uploadfile']['name'])) {
|
||||
@@ -40,8 +40,8 @@ if ($boolUpload && !empty($_FILES['uploadfile']['name'])) {
|
||||
}
|
||||
}
|
||||
|
||||
$stmt = $db->prepare("INSERT INTO location (username,age,transport,description,defect,topic,lng,lat)
|
||||
VALUES (:username,:age,:transport,:description,:defect,:topic,:lng,:lat)");
|
||||
$stmt = $db->prepare("INSERT INTO location (username,age,transport,description,defect,topic,lng,lat,district)
|
||||
VALUES (:username,:age,:transport,:description,:defect,:topic,:lng,:lat,:district)");
|
||||
|
||||
$stmt->bindValue(':username', $strUsername);
|
||||
$stmt->bindValue(':age', $strAge);
|
||||
@@ -51,6 +51,7 @@ $stmt->bindValue(':topic', $numTopic);
|
||||
$stmt->bindValue(':lng', $numLng);
|
||||
$stmt->bindValue(':lat', $numLat);
|
||||
$stmt->bindValue(':defect', $numDefect);
|
||||
$stmt->bindValue(':district',$strDistrict);
|
||||
$stmt->execute();
|
||||
|
||||
// fetch last_id - sqlite
|
||||
|
||||
Reference in New Issue
Block a user