-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemp.php
More file actions
39 lines (38 loc) · 1.04 KB
/
temp.php
File metadata and controls
39 lines (38 loc) · 1.04 KB
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
<?php
$admin_id=$_POST['aid'];
$admin_pass=$_POST['apass'];
$conn=new mysqli('localhost','root','','e-healthcare');
$result=$conn->query('select * from admin_login');
if($result->num_rows>0)
{
while($row=$result->fetch_assoc())
{
if (!$_POST['aid'] | !$_POST['apass'])
{
echo("<SCRIPT LANGUAGE='javaScript'>
window.alert('you did not complete all of the required fields')
window.location.href='login.html'</SCRIPT>");
exit();
}
if($row['Email']==$admin_id)
{
if($row['Password']==$admin_pass)
{
/*header('Location:http://localhost/health/AddDoctor.html');*/
echo("<SCRIPT LANGUAGE='javaScript'>
window.alert('Login Succesfull.')
window.location.href='AddDoctor.html'</SCRIPT>");
exit();
}
else
{
/*echo 'You enter Wrong password for '.$admin_id;*/
echo("<SCRIPT LANGUAGE ='javaScript'>
window.alert('Wrong id and password, re-entetr id and password')
window.location.href='login.html'</SCRIPT>");
exit();
}
}
}
}
?>