Tedd's Query Demo via POST

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

ID = 0


 

CODE FOLLOWS

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

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

    // get the id from a POST operation via POST ternary operator

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

?>

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

<p>
    Note this DEMO passes a variable (and it's value) via a POST ternary operation.
    In other words, the name of the variable and it's value is being passed
    through POST form.
</p>

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

<form action="" method="POST">

    <input type="hidden" name="id" value="<?php echo($id 1); ?>">
    <input type="submit" name="submit" value="DECREASE">

</form>

<br>

<form action="" method="POST">

    <input type="hidden" name="id" value="<?php echo($id 1); ?>">
    <input type="submit" name="submit" value="INCREASE">

</form>

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