PHP program to display student details

In this program, you will take student details like FirstName, Surname, date of birth, roll number, and phone number and you will display all these details by using PHP.

Display student details in PHP by using the HTML form

    $name = $_GET['Sname'];
    $surname = $_GET['surname'];
    $dob = $_GET['dateOfBirth'];
    $rollNo = $_GET['rollNo'];
    $phoneNumber = $_GET['PhoneNumber'];
    echo 'FirstName: ',$name;
    echo '</br>Surname: ',$surname;
    echo '</br>Date of Birth: ',$dob;
    echo '</br>RollNo: ',$rollNo;
    echo '</br>Phone Number: ', $phoneNumber;

<!DOCTYPE html>
    <title> display student details </title>
        FirstName: <input type="text" name="Sname"> </br></br>
        Surname: <input type="text" name="surname"> </br></br>
        dateOfBirth <input type="date" name="dateOfBirth"> </br></br>
        RollNumber <input type="text" name="rollNo"> </br></br>
        PhoneNumber <input type="number" name="PhoneNumber"> </br></br>
        <input type="submit" value="submit" name="formsubmit"> </br></br>


PHP program to display student details