-
Notifications
You must be signed in to change notification settings - Fork 3
/
php1.php
60 lines (57 loc) · 1.42 KB
/
php1.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<html>
<?php
$con1=mysql_connect ("127.0.0.1","root","");
if ($con1==false)
{
echo "connection failed".mysql_error();
}
mysql_select_db("se1",$con1);
$res=mysql_query ("std",$con1);
$a=$_POST['sname'];
$b=$_POST ['fname'];
$c=$_POST ['mname'];
$d=$_POST['DOB'];
$e=$_POST['gender'];
$f=$_POST['address'];
$g=$_POST['appid'];
$h=$_POST['password'];
$i=$_POST ['repassword'];
$j=$_POST ['course'];
$k=$_POST['marks1'];
$l=$_POST['marks2'];
$m=$_POST['jee'];
$n='Pending..';
$sq="select * from std where appid='$g';";
$res1=mysql_query($sq,$con1);
$count = mysql_num_rows($res1);
if($count==0)
{
if ($h!=$i || $a==NULL || $b==NULL || $c==NULL || $d==NULL || $e==NULL || $f==NULL || $g==NULL || $h==NULL || $i==NULL || $j==NULL || $k==NULL || $l==NULL || $m==NULL)
{
echo '<script type="text/javascript">';
echo 'alert("review your entries");';
echo 'window.location.href = "index6.html";';
echo '</script>';
}
else
{
$in="insert into std Values ('$a','$b','$c','$d','$e','$f','$g','$h','$j','$k','$l','$m','$n')";
$res1=mysql_query($in,$con1);
if ($in)
header("Location:index9.html");
else
{
echo "Enter Valid Details";
header("Location:index6.html");
}
}
}
else
{
echo '<script type="text/javascript">';
echo 'alert("Application id not valied");';
echo 'window.location.href = "index6.html";';
echo '</script>';
}
?>
</html>