-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathsave.php
69 lines (41 loc) · 1.06 KB
/
save.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
61
62
63
64
65
66
67
68
<?php
require_once("connection.php");
error_reporting(0);
$table=$_POST['pb'];
$v=$_POST['c1'];
error_reporting(0);
$q1="CREATE TABLE $table( value VARCHAR(50000))";
$q2="INSERT into $table VALUES('$v')";
$sq1=mysqli_query($con,$q1);
$sq2=mysqli_query($con,$q2);
if($sq1 && $sq2)
{
$sqq="SELECT * FROM $table";
$r=mysqli_query($con,$sqq);
/*while($row=mysqli_fetch_array($r))
{
echo("$row[value]");
}*/
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Save</title>
</head>
<body>
<div style="margin-left:600px;">
<b><span style="font-size:25px;">Problem List</span></b><br><br>
<?php
require_once("connection.php");
$q6="SELECT table_name FROM information_schema.tables where table_schema='problem' ";
$res=mysqli_query($con,$q6);
while($row=mysqli_fetch_array($res))
{
error_reporting(0);
echo '<form action="test.php" method="POST"> <input type="hidden" name="pb" value="' . htmlspecialchars($row[table_name]) . '" /><input type="submit" value=" ' . htmlspecialchars($row[table_name]) .' "/></form>'."<br>";
}
?>
</div>
</body>
</html>