Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once '../lib/php/password.php';
- $dbconn = pg_connect(
- "host=host dbname=name user=admin password=pass"
- ) or die('Could not connect: ' . pg_last_error());
- if (isset($_SERVER['HTTP_ORIGIN'])) {
- header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");
- header('Access-Control-Allow-Credentials: true');
- header('Access-Control-Max-Age: 86400');
- header("Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS");
- }
- if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
- if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD']))
- header("Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS");
- if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']))
- header("Access-Control-Allow-Headers: {$_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']}");
- }
- $login = $_POST['loginValue'];
- $query = "SELECT * FROM info_users WHERE login = '" . pg_escape_string($login) . "'";
- var_dump($_POST);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement