By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

PHP Posting form to another page


Well-Known Coder
I don't understand what is going wrong here I have a form for my users called reservation.php this one (is supposed to ) goes to reservationback.php but I have been trying it and for some reason it goes to reservation.php?submit=submit why is this happening??
reservation.php this one is suppossed to go to reservationback.php but it's not working

include "config.php";
    <!DOCTYPE html>
    <html lang="en">
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <script src="https://cdn.jsdelivr.net/npm/litepicker/dist/litepicker.js"></script>
        <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
    <?php include "navbar.php"; ?>
            padding: 0;
            margin: 0;
            height: 100%;
            background-color: gray;
            padding-left: 10px;
            padding-right: 10px;
            margin-top: 10%;
            padding: 0;
            background-color: yellow;
            padding: 10px;
            background-color: black;
            color: white;
            padding: 10px;
    <form action="reservationback.php" method="POST">
        <div class="container mb-3">
            <div class="top">
            <h2>Reserveren <?php echo $_GET['naam'];?>
            <div class="information mb-3">
                    <div class="check in mb-3">
                        <!-- <label for="checkIn" class="form-label">Check in </label>  -->
                            $sql = "SELECT * FROM reserveringen";
                            $stmt = $conn->prepare($sql);
                            $result = $stmt->get_result();
                            while ($row = mysqli_fetch_assoc($result)) {
                                echo $row['start_datum']; //start date
                                echo "<br>";
                                echo $row['eind_datum']; //end date
                            <!-- je moet je eigen kalender maken -->
                        <div class="check in mb-3">
                            <label for="Naam" class="form-label">Naam: </label> 
                            <input type="text" class="form-control" id="Naam"/>
                        <div class="check in mb-3">
                            <label for="Email" class="form-label">Email: </label> 
                            <input type="email" class="form-control" id="Email"/>
                        <div class="check in mb-3">
                            <label for="Telefoonnummer" class="form-label">Telefoonnummer: </label> 
                            <input type="text" class="form-control" id="Telefoonnummer"/>
                        <div class="form-group ">
                            <input type="submit" name="submit" class="btn btn-info btn-md" value="submit">


pic of where it goes to


New Threads

Buy us a coffee!

Top Bottom