What is the return value when nothing is received by PHP's $_GET?

Display when nothing is received with $_GET

I want to change the display when something is received with $_GEt. Please tell me how to be smart.

I'm creating a customer-facing mechanism on the Wordpress administration page,

If the customer list is admin.php? page = hogehoge_team_clients and you link to the customer's response page


, $_GET detects the client's ID and displays the customer's individual response page instead of the customer list ...

If $_GEt doesn't receive client ID, display customer list ...

Please tell me if there are other smart ways.

Additional information

$customlink = $row ["client_id"];
$title = 'Individual page';
$url = admin_url ();
print '<a href = "'. $url. 'admin.php? page = hogehoge_team_clients&client ='. $customlink. '">'. $title. '</a><br />';
$client = $_GET ['client'];
if ($client = nothing) {
 Display customer list page

↑ This is a link to the customer's personalized page in admin.php? page = hogehoge_team_clients (customer list page).
The "customer list" and "individual page" are displayed in the same PHP file.

I wanted to make it possible to receive or not accept parameters via $_GET as the condition for switching between "customer list" and "individual page" ...

Is there any way?

  • Answer # 1

    var_dump ($_ GET);

    Now you can see the difference between "when you received nothing" and "when you received something".

  • Answer # 2

    Let's read "PHP picture books".