What I am trying to do is take a number from row in a table...
and have it so that it can be echoed with a checkbox.

Then, if someone were to check that box, could I it have so that the number in the rows would decrease by one after it was submitted?

Thank you in advance.

    a simple example:

    <?php
    if (!isset($_POST['submit']))
    {
    	echo '
    	<form action="" method="POST">
    	<input type="checkbox" name="num[]" value="5"> 5<br>
    	<input type="checkbox" name="num[]" value="6"> 6<br>
    	<input type="checkbox" name="num[]" value="7"> 7<br>
    	<input type="checkbox" name="num[]" value="8"> 8<br>
    	<input type="checkbox" name="num[]" value="9"> 9<br>
    	<input type="submit" name="submit" value="submit">
    	</form>
    	';
    }
    else
    {
    	if (isset($_POST['num']))
    	{
    		foreach ($_POST['num'] as $value)
    		{
    			$minus = $value - 1;
    			echo $value . ' - 1 = ' . $minus . '<br>';
    		}
    	}
    	else
    	{
    		echo 'you did not check any numbers';
    	}
    }
    ?>
    
      Write a Reply...