Switched 'GET' to 'POST'

php
Aadhavan Srinivasan 1 year ago
parent 1c1e322bd8
commit 3fbb6c99df

@ -33,7 +33,7 @@ if (!isset($_SESSION['user'])) {
<div id="root" class="w-full h-full">
<div id="formspace" class="flex flex-wrap flex-row w-full bg-white dark:bg-black rounded-lg shadow-lg shadow-black/50">
<form id="form" class="lg:w-1/2 sm:w-full justify-center" method="GET" action="result.php" onsubmit="return validate()">
<form id="form" class="lg:w-1/2 sm:w-full justify-center" method="POST" action="result.php" onsubmit="return validate()">
<div class="flex flex-wrap">
<label for="URL" class="text-2xl ml-4 font-rubik self-center dark:text-[#ffff59] dark:brightness-125">URL</label>
<span class="mandatory font-rubik self-center text-2xl">*</span>

@ -1,8 +1,8 @@
<?php
require_once 'db.inc.php';
$email = $_GET['email'];
$password = $_GET['password'];
$email = $_POST['email'];
$password = $_POST['password'];
$session = init_cass_db();

@ -11,7 +11,7 @@ var glink = params.get("glink");
var lat;
var long;
var method = "GET";
var method = "POST";
var request;
function requestHandler() {

@ -33,21 +33,21 @@ ini_set('display_errors', 1);
$session = init_cass_db();
$url = $_GET["url"];
$url = $_POST["url"];
if (isset($_GET["restricted"])) {
if (isset($_POST["restricted"])) {
$is_geo = 1;
} else {
$is_geo = 0;
}
if ($is_geo == 1) {
$radius = $_GET["radius"];
$radius = $_POST["radius"];
$latitude = $_GET["latitude"];
$latitude = $_POST["latitude"];
$latitude = doubleval($latitude);
$longitude = $_GET["longitude"];
$longitude = $_POST["longitude"];
$longitude = doubleval($longitude);
}
@ -57,10 +57,10 @@ if (($matches == 0) || ($matches == false)) {
return;
}
$shortlink = $_GET["glink"];
$shortlink = $_POST["glink"];
if (isset($_GET["ttl"])) {
$ttl = $_GET["ttl"];
if (isset($_POST["ttl"])) {
$ttl = $_POST["ttl"];
} else {
$ttl = 0;
}

@ -1,10 +1,10 @@
<?php
require_once 'db.inc.php';
$email = $_GET['email'];
$email = $_POST['email'];
$email = strval($email);
$username = $_GET['username'];
$password = $_GET['password'];
$username = $_POST['username'];
$password = $_POST['password'];
$id = rand(0,99999999);
$hash = password_hash($password,PASSWORD_BCRYPT);

Loading…
Cancel
Save