-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreg.php
32 lines (23 loc) · 986 Bytes
/
reg.php
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
28
29
30
31
32
<?php
$conn = mysql_connect('localhost','root','','kdlogin');
if(! $conn )
{
die('Could not connect: ' . mysql_error());
}
$name = $_POST['name'];
$username = $_POST['username'];
$email = $_POST['email'];
$password = $_POST['password'];
//echo $name;
//echo $username;
mysql_select_db('kdlogin');
$sql = " INSERT INTO login (name,username,emailid,password)
VALUES('$name','$username','$email','$password');";
$retval = mysql_query( $sql, $conn );
if(! $retval )
{
die('Could not update data: ' . mysql_error());
}
echo "Updated data successfully\n";
mysql_close($conn);
?>