?> </div> <div class="<?php echo getErrorClass($errors, 'password'); ?> "> <div> <label for="password">Password: </label> <input type="password" name="password" id="password"> </div> <div> <label for="verifying-password">Repeat password: </label> <input type="password" name="verifyPassword" id="verifying-password"> </div> <?php echo getFieldErrors($errors, 'password'); ?> </div> <div> <input type="submit"> </div> </form> <?php if ($_POST) { ?> <?php echo correctForm($errors); ?> <?php } ?>
<body> <div id="root"> <form action="" method="POST"> <input type="text" name="degreesInput" class="<?php echo getErrorClass($errors); ?> " value="<?php echo htmlentities($input); ?> "> <select name="degreesSystem" id="degreesSystem"> <option value="FtoC">F to C</option> <option value="CtoF">C to F</option> </select> <input type="submit"> </form> <?php echo getFieldErrors($errors, 'input'); ?> <?php if ($_POST) { ?> <?php echo correctForm($errors); ?> <?php } ?> </div> </body> </html>
border-color: red; } </style> </head> <body> <form action="" method="post"> <div class = "<?php echo getErrorClass($validationErrors, 'numbers'); ?> "> <label for="numbers">Enter 10 numbers separated with commas:</label> <input type="text" id="numbers" name="numbers" /> <?php echo getFieldErrors($validationErrors, 'numbers'); ?> </div> <input type="submit" id="submit" /> </form> <br /> <?php if ($_POST) { $nums = explode(',', $numbers); sort($nums); $min = $nums[0]; $max = $nums[0];
<input type="text" id="firstNum" name="firstNum" /> <?php echo getFieldErrors($validationErrors, 'firstNum'); ?> </div> <div class = "<?php echo getErrorClass($validationErrors, 'secondNum'); ?> "> <label for="secondNum">Enter second number:</label> <input type="text" id="secondNum" name="secondNum" /> <?php echo getFieldErrors($validationErrors, 'secondNum'); ?> </div> <div> <select name="operation" id="operation"> <option>--Choose operation--</option> <?php echo options(['sum' => '+', 'subtraction' => '-', 'multiplication' => '*', 'division' => '/'], $operation); ?> </select> </div> <input type="submit" id="submit" />
} else { ?> The passwords don't match. <?php } } $cryptedPass1 = crypt($password, '$1$pp$'); $cryptedPass2 = crypt($rep_password, '$1$repp$'); ?> <br /> <?php if ($password && $rep_password && $username && !getFieldErrors($validationErrors, 'username') && !getFieldErrors($validationErrors, 'password') && !getFieldErrors($validationErrors, 'rep_password')) { ?> <p>Username: </p> <?php echo $username; ?> <p>Crypted passwords: </p> <?php echo $cryptedPass1; ?> <br /> <?php echo $cryptedPass2; ?> <?php
?> "> <label for="lastname">Lastname: </label> <input type="text" id="lastname" name="lastname" value="<?php echo htmlentities($lastname); ?> "> <?php echo getFieldErrors($errors, 'lastname'); ?> </div> <div class="<?php echo getErrorClass($errors, 'date'); ?> "> <label for="birthdate">Birthdate: </label> <input type="date" id="birthdate" name="date" value="<?php echo htmlentities($date); ?> "> <?php echo getFieldErrors($errors, 'date'); ?> </div> <div> <input type="submit"> </div> </form> </div> </body> </html>