با سلام و وقت بخیر
آدرس href من باز میشه و مشکلی نداره و تو صفحه test.php یا همون single.php که شما نام گذاری کردید id رو نمیگیره و ارور undefined index میده
html>
<html lang="fa">
<head>
<meta charset="UTF_8">
<meta name="viewport"
content= "width=device-width , initial-scale=1.0">
<meta http-equiv="X-UA-Compatible"
content="ie=edge">
head>
<title>GET methodtitle>
<body>
if (!empty($_GET["firstName"]) || !empty($_GET["age"]))
{
echo "Welcome" . $_GET["firstName"] ."
";
echo "You are " . $_GET["age"] . "years old";
}else
{
echo "fill in the gaps";
}
?>
<form action=" $_SERVER["PHP_SELF"] ?>" method="GET">
<label for="">name
<input type="text" name="firstName">
label>
<label for="">age
<input type="text" name="age">
label>
<input type="submit" value="send">
form>
<a href="http://localhost:8080/php-experts-7learn/09-supreglobal-variables.php/test.php?id=10">PHP Learnersa>
body>
html>
کد test.php
"; echo "your id is:" .$_GET['id']; ?>