lets say, I am sending a question number from page a.php to page b.php.
<a href=../home/Open.php?var=$row[id]></a>
After receiving the question number in b.php at
$var=$_GET['var'];
now the problem is I want to redirect the same page b.php using header
header("Location:open.php?var=".$var);
and passing the same value that I received from a.php.
Now is it possible to receive the value at
$var=$_GET['var'];
again?
Your var
is empty because you use your PHP value wrong.
There is no quote
around id
- if id
is not a variable.
No echo
No <?php ?>
around it.
Should be:
<a href="../home/Open.php?var=<?php echo $row['id']; ?>"></a>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.