-4

I got an error in the last line <?php } ?> it says syntax error, unexpected '}'

<?php if (isset($_SESSION['u_id'])) { 
            //echo "You are logged in!";
             include_once 'database.php';
             $edit_state = false; ?>
                <h2>Welcome!</h2>
                <form method="POST" action="process.php">
                <div class="input-group">
                    <label>Reference Number: <label>
                    <input type="text" name="reference_no" value="">
                </div>
                <div class="input-group">
                    <label>Action Taken<label>
                    <input type="text" name="action_taken" value="">
                </div>
                <div class="input-group">
                <?php if ($edit_state == false): ?>
                    <button type="submit" name="save" class="btn">Save</button>
                <?php else: ?> 
                    <button type="submit" name="update" class="btn">Update</button>
                <?php endif ?>
                </div>
            </form>
        <?php } ?>
Edrian
  • 3
  • 5

1 Answers1

0

you missing a ; after endif at <?php endif ?>

change this <?php endif ?> to <?php endif; ?>

M0ns1f
  • 2,705
  • 3
  • 15
  • 25