Tedd's Query Demo via GET

Note this DEMO passes a variable (and it's value) via a GET ternary operation. In other words, the name of the variable and it's value is being passed through the URL. There is no form involved.

Please note the string "?id=0" in the URL.

ID = 0

DECREASE ID     INCREASE ID      
 

CODE FOLLOWS

<?php
    
include('includes/header.php');

    
error_reporting(E_ALL);    // set error reporting to all

    // get the id from the URL via GET ternary operator

    
$id = isset($_GET['id']) ? $_GET['id'] : 0;

?>

<h1>Tedd's Query Demo via GET</h1>

<p>
    Note this DEMO passes a variable (and it's value) via a GET ternary operation.
    In other words, the name of the variable and it's value is being passed
    through the URL. There is no form involved.
</p>
<p>
    Please note the string "?id=<?php echo($id); ?>" in the URL.
</p>

<p>
    ID = <?php echo($id); ?>
</p>

<a href="query-get.php?id=<?php echo($id 1); ?>"> DECREASE ID </a> &nbsp; &nbsp;
<a href="query-get.php?id=<?php echo($id 1); ?>"> INCREASE ID </a> &nbsp;  &nbsp; &nbsp;

<?php
    
include('includes/footer.php');
?>