I'm trying to make an app when users fill form, and click send button, to send informations through url parametrs like :
localhost/my.php?param1=Name¶m2=SureName
I have read through internet about it, but can't get it, I found some examples but they tell how to pass through Json, I want just to send through link. (I think is easiest way )
My php code is:
<?php
require "connection.php";
if (!isset($_GET['param1'])) {
echo '<p align="center"> No data passed!</p>"';
}
if (strcmp($_GET['param1'],'FirstParam')== 0)
{
$sql= "Query HERE TO ADD INTO DB";
mysqli_query($connection,$sql);
if ($connection->query($sql) === TRUE) {
echo "Record updated successfully";
} else {
echo "Error updating record: " . $connection->error;
}
mysqli_close($connection);
}
Any help will be appreciated.