Help me with my code please


#1

i am creating a feedback form
here is my code:

<html>
<head>
    <title>Feedback For Strivers</title></head>
<body>
    <h1 align="center"> Strivers Welcomes You To The Feedback Page</h1>
    <h3 align="center">Please Fill The Form Below</h3>
    <form action="feedback.php">
    <label for="name">Your Name</label>
    <input type="text" id="name" name="name"><br/>
    <label for="batch">Your Batch</label>
    <select id="batch" name="batch">
        <option value="academic">Academic</option>
        <option value="GT">GT</option></select><br />
    <label for="phone">Your Phone</label>
    <input type="number" id="phone" name="phone"><br />
        <label for="feedback">Feedback</label>
        <textarea id="feedback" name="feedback"></textarea>
    <input type="submit">
    </form>
    
</body>
</html>

here is php code for it:

<?php
    $your_name = $_POST['name'];
    $your_batch = $_POST['batch'];
    $your_phone = $_POST['phone'];
    $your_feedback = $_POST['feedback'];

    echo 'Your Name is ' . $your_name;
    echo 'You are in ' . $your_batch . ' Batch.';
    echo 'Your Phone Number is ' . $your_phone;
    echo 'Your Feedback For Strivers: ' . $your_feedback;

?>

the form is supposed to display content after clicking submit but its not working


#3

The form needs a method attribute.

Spoiler

<form method="post" action="feedback.php">