Files
ticket_dev/database_old.php

59 lines
1.2 KiB
PHP
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// Имя ДБ: turistpr_erv
// Пользователь: turistpr_erv
// Пароль: c7vOXbmG
// Адрес хоста: 141.8.194.131
// таблица lexrpiority
if(isset($_POST['action']) && !empty($_POST['action'])) {
$action = $_POST['action'];
switch($action) {
case 'user_verify' : user_verify(); break;
}
}
function user_verify() {
$finded_row['success']="false";
//$link = mysqli_connect("141.8.194.131", "turistpr_erv", "c7vOXbmG");
$link = mysqli_connect("localhost", "ci20465_erv", "c7vOXbmG");
if ($link == false){
}
else {
}
$birthday = $_POST['birthday'];
$inn = $_POST['inn'];
//$sql = "SELECT * FROM turistpr_erv.lexrpiority";
$sql = "SELECT * FROM ci20465_erv.lexrpiority";
$result = mysqli_query($link, $sql);
$finded_row=array("success"=>"false","message"=>"Полис не найден", "result" => "");
if($inn) {
while ($row = mysqli_fetch_assoc($result)) {
if($inn==$row['voucher']) {
$finded_row['success']="true";
$finded_row['message']="Полис найден";
$finded_row['result']=$row;
}
}
}
echo json_encode($finded_row);
}
?>