-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathregis.php
More file actions
27 lines (25 loc) · 741 Bytes
/
regis.php
File metadata and controls
27 lines (25 loc) · 741 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
$server_NAME="localhost";
$admin_NAME="admin";
$password="localhost";
$database="first_DB";
$connect=mysqli_connect($server_NAME,$admin_NAME,$password,$database);
if(!$connect){
die('connection failed:'.mysql_error());
}
$password=$_POST['password'];
$c_password=$_POST['c_password'];
if($c_password==$password){
$user_info="INSERT INTO registration_table (name,email,Reg_no,Password)
VALUES('$_POST[name]','$_POST[email]','$_POST[reg_no]','$_POST[password]')";
if(!mysqli_query($connect,$user_info))
echo "Error:".mysqli_error($connect);
else{
header("location:feedback_form.html");
}
}
else{
echo "<h1>Please enter same password on both columns:</h1>".mysqli_error($connect);
}
mysqli_close($connect);
?>