-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathascd1.php
More file actions
29 lines (27 loc) · 994 Bytes
/
Copy pathascd1.php
File metadata and controls
29 lines (27 loc) · 994 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
<?php
mysql_connect("localhost","root","") or die("mysql connection is failure.");
mysql_select_db("e-healthcare") or die("Database does not exists.");
if (isset($_POST['submit'])){
$username=mysql_escape_string($_POST['did']);
$password=mysql_escape_string($_POST['pass2']);
if (!$_POST['did'] | !$_POST['pass2']) {
echo("<SCRIPT LANGUAGE='javaScript'>
window.alert('you did not complete all of the required fields')
window.location.href='e-healthcare.html'</SCRIPT>");
exit();
}
$sq = mysql_query(" SELECT * FROM 'add_doctor' WHERE 'Email_ID' = '$username' AND 'Password'='$password'");
if (mysql_num_rows($sq) > 0) {
echo("<SCRIPT LANGUAGE='javaScript'>
window.alert('Login Succesfull.')
window.location.href='doctor.html'</SCRIPT>");
exit();
}
else{
echo("<SCRIPT LANGUAGE ='javaScript'>
window.alert('Wrong id and password, re-entetr id and password')
window.location.href='e-healthcare.html'</SCRIPT>");
exit();
}
}
?>