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="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"> <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"> <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> <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> <span class="mandatory font-rubik self-center text-2xl">*</span>

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

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

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

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

Loading…
Cancel
Save