0% found this document useful (0 votes)
10 views1 page

User Registration Form and Process

The document is an HTML registration form that collects a user's first name, last name, email, and password. Upon submission, it processes the data using PHP to insert it into a MySQL database. If the registration is successful, it displays a success message; otherwise, it shows an error message.

Uploaded by

meetyaduvanshi13
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views1 page

User Registration Form and Process

The document is an HTML registration form that collects a user's first name, last name, email, and password. Upon submission, it processes the data using PHP to insert it into a MySQL database. If the registration is successful, it displays a success message; otherwise, it shows an error message.

Uploaded by

meetyaduvanshi13
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

<!

DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Registration</title>
</head>

<body>
<form action="" method="post">
First name: <input type="text" name="f_name"> Last name: <input type="text"
name="l_name"> Email: <input type="email" name="email"> Password <input
type="password" name="password">

<button type="submit" name="submit">submit</button>


</form>
<?php
if(isset($_POST['submit'])){

$f_name=$_POST['f_name'];
$l_name=$_POST['l_name'];
$email=$_POST['email'];
$password=$_POST['password'];
$con= mysqli_connect('localhost','root','','Registration');
$q="INSERT INTO cliant(f_name,l_name,email,password)
VALUES('$f_name','$l_name','$email','$password')";
if(mysqli_query($con,$q)){
echo "registration success";
}
else{
echo "error";
}
}

?>
</body>

</html>

You might also like