コード例 #1
0
ファイル: login.php プロジェクト: billxcode/aagim
<?php

include "crud.php";
$control = new crud();
$username = $control->security($_POST['username']);
$password = $control->security($_POST['password']);
if ($control->login($username, $password)) {
    echo "success";
    session_start();
    $_SESSION['username'] = $username;
    $_SESSION['password'] = $password;
} else {
    echo "failed";
}
コード例 #2
0
ファイル: saveLocation.php プロジェクト: billxcode/aagim
<?php

include "crud.php";
$control = new crud();
$longitude = $control->security($_POST['lon']);
$latitude = $control->security($_POST['lat']);
if ($control->saveData($longitude, $latitude)) {
    echo "true";
} else {
    echo "false";
}