-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbus.php
More file actions
37 lines (32 loc) · 910 Bytes
/
bus.php
File metadata and controls
37 lines (32 loc) · 910 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
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html>
<html>
<head>
<title>
</title>
</head>
<body>
<?php
$hostname = "localhost";
$username = "root";
$password = "";
$con = mysql_connect($hostname, $username, $password) ;
if (!$con){ die('Could not connect: '. mysql_error());}
$dbName="delhimetro";
$db = mysql_select_db($dbName,$con);
$sql="INSERT INTO user
VALUES ('$_POST[user]',
'$_POST[fname]',
'$_POST[age]',
'$_POST[aadhar]',
'$_POST[email]',
'$_POST[password]',
'$_POST[mobile]')";
if (!mysql_query($sql,$con))die('Error: ' . mysql_error());
echo "1 record added";
mysql_close($con)
?>
<script type="text/javascript">
window.location.href = "login.php";
</script>
</body>
</html>