php - Saving fields and loading them -
i making program diving coach calculates dive score judges enter judgement. problem having fields clear when press submit. additionally, able save dive sheet , able reload data within after navigating away, reloading, or closing , reopening. maybe later allow multiple sheets of different dates per diver, can later.
i hiding lot of errors setting variables $_get code, filling lot of space warnings.
this code:
<tr> <td> <form action='guest6.php' method='get'> 1. <input placeholder='judge 1 score' autocomplete='off' name='score1a'> </td> <td> <input placeholder='judge 2 score' autocomplete='off' name='score1b'> </td> <td> <input placeholder='judge 3 score' autocomplete='off' name='score1c'> </td> <td> <input placeholder='enter dd' autocomplete='off' name='dd1'> <input type='submit'> </form> </td> <td> <?php if (($_get["score1a"] != '') || ($_get["score1b"] != '') || ($_get["score1c"] != '')) { $j1a = $_get["score1a"]; $j1b = $_get["score1b"]; $j1c = $_get["score1c"]; $dd1 = $_get["dd1"]; echo $score1 = ($j1a + $j1a + $j1a) * $dd1; } ?> </td> </tr>
try this:
<tr> <td> <form action='guest6.php' method='get'> 1. <input placeholder='judge 1 score' autocomplete='off' name='score1a' value='<?php echo $_get["score1a"];?>'> </td> <td> <input placeholder='judge 2 score' autocomplete='off' name='score1b' value="<?php echo $_get["score1b"];?>"> </td> <td> <input placeholder='judge 3 score' autocomplete='off' name='score1c' value="<?php echo $_get["score1c"];?>"> </td> <td> <input placeholder='enter dd' autocomplete='off' name='dd1'> <input type='submit'> </form> </td> <td> <?php if (($_get["score1a"] != '') || ($_get["score1b"] != '') || ($_get["score1c"] != '')) { $j1a = $_get["score1a"]; $j1b = $_get["score1b"]; $j1c = $_get["score1c"]; $dd1 = $_get["dd1"]; echo $score1 = ($j1a + $j1a + $j1a) * $dd1; } ?> </td> </tr>
Comments
Post a Comment