You are on page 1of 4

EX NO:8 PASSPORT VERIFICATION

AIM:
To establish the implementation of front end and back end of development

FRONT END CODE


<!DOCTYPE html>

<head>

<title>staff details</title>

<body>

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

<h1><i> STAFF DETAILS FORM</i></h1>

<label>Name</label><br>

<input type="text" name="sname"><br>

<label>passport nunber</label><br>

<input type="text" name="passnum"><br>

<label>date of birth</label><br>

<input type="date" name="dob""><br>

<label>EMAIL</label><br>

<input type="email" name="mail"><br>

<label>phone number</label><br>

<input type="text" name="num">

<button id="sumit">sumit</button>

</body>

</head>

</form>
BACKEND CODE

<?php

$conn=mysqli_connect('localhost','root','','test');

if(!$conn){ die("could Not

connect".mysqli_error());

else{
$name1 = $_POST["sname"];

$passnum = $_POST["passnum"];

$dob = $_POST["dob"];

$email = $_POST["mail"];

$num =$s_POST["num"];

$sql = "insert into staff values('$name1','$passnum',' $dob','$email','$num')"; if($conn-

>query($sql)==true){ echo "Done...";

else{ echo

"Fail...";

?>

SQL OUTPUT :
RESULT:
Thus the full stack development has been executed successfully.

You might also like