I'm using the below for get in php without a form.
If($q)
{
header("location:d.php?q=$name");
}
Is it correct?
I'm using the below for get in php without a form.
If($q)
{
header("location:d.php?q=$name");
}
Is it correct?
According to the specification, the URI in the location header must be an absolute URI.
But regardless of this, your code will create an (unnecessary?) redirect.
If you want to persist values between requests, a better way would to use sessions.