I have a link like this: http://localhost/edit.php?id=0
But, When I try to take the value like this: $id = $_GET['id'];
It returns null
. Why it's happening? My code is like this:
<?php
public function loadEdit($hconn) {
if (!empty($_GET['id'])) {
$id = $_GET['id'];
if ($this->isNumber($id) != true && !($id > 0)) {
echo $id;
header("Location: /goods.php");
} else {
//header("Location: /goods.php");
}
}
}