I´m trying to capture the value of id by using the URL, but always while printing tha array for debug its null
if ($_SERVER[“REQUEST_METHOD”] == “POST”) {
$user_id = isset($_GET['id']);
echo '<pre>';
print_r($_GET);
echo '</pre>';
if ($conn === false) {
die("Error");
}
if ($user_id === null) {
echo "<script>
Swal.fire({
title: 'Invalid Request',
text: 'No user ID specified.',
icon: 'error',
button: 'Close'
}).then(function() {
window.location = '...';
});
</script>";
} else {
I tried using the get variable for this
New contributor
Santiago S_Elias06 Elias is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.