-1
我試圖通過頭球page1.php中 發送變量()函數來使page2.php通過header()函數的PHP變量發送
這是page1.php中:
$id = $row['id'];
header("Location: index.php?vals=" . urlencode(serialize($id)));
和這是使page2.php
if($_GET['vals'])//to take the id
{
$id= unserialize(urldecode($_GET['vals']));
//other code
}
但我不能在第二頁中使用的$ id和得到這個錯誤
domain.tech目前無法處理此請求。 HTTP錯誤500
$ id是什麼樣的。你可能不需要urlencode和序列化函數。 – jeff