Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- if (isset($_POST['submit'])){
- $keyID = $_POST['inputKeyID'];
- $vCode = $_POST['inputVerification'];
- //...
- //validate $keyID and $vCode, make sure it's all good. Set $valid_data to true if it's valid, false if not
- //...
- if ($valid_data) {
- //data was valid, redirect to display.php
- $_SESSION['keyID'] = $keyID;
- $_SESSION['vCode'] = $vCode;
- header('Location: display.php');
- } else {
- //it wasn't valid, redirect back to the form page
- $_SESSION['error'] = "Your Key ID and Verification are invalid";
- header('Location: index.php');
- }
- } else {
- // no form data, redirect to index.php
- $_SESSION['error'] = "Please provide Key ID and verification";
- header('Location: index.php');
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement