-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdelete.php
More file actions
41 lines (36 loc) · 824 Bytes
/
Copy pathdelete.php
File metadata and controls
41 lines (36 loc) · 824 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
38
39
40
41
<?php
//Delete the data in the data_base
$u=$_REQUEST["uid"];
include "database.php";
if(isset($_REQUEST["del"]))
{
mysql_query("delete from user_master where user_id='".$u."'");
header("location:editdata.php");
}
?>
<?php
//edit database
$q=mysql_query("select * from user_master where user_id='".$u."'");
if($arr=mysql_fetch_array($q))
{
echo '
<form method="post">
UID : <input type="text" name="uid" value="'.$arr["user_id"].'"/>
<br>
UID : <input type="text" name="pwd" value="'.$arr["password"].'"/>
<br>
<input type="submit" value="update" name="upd"/>
</form>
';
}
if(isset($_REQUEST["upd"]))
{
$uid=$_REQUEST["uid"];
$pwd=$_REQUEST["pwd"];
$q=mysql_query("update user_master set password='".$pwd."' where user_id='".$uid."'");
if($q)
{
header ("location:editdata.php");
}
}
?>