-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreg.php
More file actions
37 lines (33 loc) · 1006 Bytes
/
reg.php
File metadata and controls
37 lines (33 loc) · 1006 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
<?php
$host="localhost";
$dbname="alumini";
$dbuser="root";
$name=$_POST['name'];
$batch=$_POST["batch"];
$email=$_POST["email"];
$contact=$_POST["contact"];
$add1=$_POST["add1"];
$add2=$_POST["add2"];
$city=$_POST["city"];
$state=$_POST["state"];
$pin=$_POST["pin"];
$country=$_POST["country"];
$inst_comp=$_POST["association"];
$nature=$_POST["nature"];
$lcity=$_POST["lcity"];
$link=mysqli_connect($host,$dbuser,"",$dbname);
//$conn=mysql_connect($host,$dbname,"");
//mysql_select_db($dbname,$conn);
$sql="INSERT INTO `user` values('$name','$batch','$email','$contact','$add1','$add2','$city','$state','$pin','$country','$inst_comp','$nature','$lcity');";
//foreach ($fdata as &$value) {$value;}
//$sql1="insert into user values ('array_push($fdata)')";
if($result=mysqli_query($link,$sql)){
echo "Successfully Registered";
echo"<b>";
echo $result;
include("success.html");
}else{
echo "ERROR: Could not able to execute $sql. " . mysqli_error($link);
}
mysqli_close($link);
?>