-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdbTerm.php
More file actions
62 lines (47 loc) · 1.75 KB
/
dbTerm.php
File metadata and controls
62 lines (47 loc) · 1.75 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
if(!isset($_POST['submit']))
{
$stat ="";
$access="";
$username="";
$access="";
$query="";
$name="";
$result="";
}
if(isset($stat))
{
echo $stat;
}
if( isset($_POST['access']) && $_POST['access']!="none")
{
$insert1 = $_POST["username"];
$insert2 = $_POST['name'];
$insert3 = $_POST['password'];
$insert4 = $_POST['table'];
$insert5 = trim($_POST['query']);
echo "<br>";
echo $_POST['access'];
echo "<br>";
$access=$_POST['access'];
if($access=='Insert'){
$box = array('username'=>$insert1,'password'=>$insert3);
dbInsert($dblink,$insert5,$box,$insert4);
}
if($access=="Print"){
echo "DB Items:<br>";
dbPrint($dblink,$insert5);
}
if($access=='Remove'){
$box = array('col'=>$insert2,'value'=>$insert1);
dbRemove($dblink,$insert5,$box,$insert4);
}
if($access=='Update'){
$shelf = array();
$box1 = split(" ",$insert2);
$box2= split(" ",$insert1);
$shelf = ['col'=>$box1, 'value'=>$box2];
dbUpdate($dblink,$query,$shelf,$insert4);
}
}
?>