-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwhatsall_lefto_add.txt
59 lines (48 loc) · 1.34 KB
/
whatsall_lefto_add.txt
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
Read about the following:
Cross-site Scripting attacks
<form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
There can be two usernames and passwords
1 to add questions and nothing else
2 to code
-Colour Code 1f5289
<?php
include "connection.php";
if(isset($_POST["Compile & Run"])){
$code1=$_POST["code1"];
$text1=str_replace("\n","<br>",$code1);
$code2=$_POST["code2"];
$text2=str_replace("\n","<br>",$code2);
$code3=$_POST["code3"];
$test3=str_replace("\n","<br>",$code3);
$code4=$_POST["code4"];
$text4=str_replace("\n","<br>",$code4);
}
$sql= "insert into accml values ('$text1', '$text2', '$text3', '$text4')";
$result = mysql_query($sql);
?>
<html>
<body>
<table width = "100%" border = "1" cellspacing= "10" cellpadding = "10">
<tr>
<td>pattern</td>
<td>code_here</td>
</tr>
</table>
</body>
</html>
<?php
while($row = mysql_fetch_object($result))
{
?>
<tr>
<td>
<?php echo $row->pattern;?>
</td>
<td>
<?php echo $row->code_here;?>
</td>
<td> <a href= "listening.php? id =<?php echo $row->question 1;?>" onclick= "return confirm('Are you sure')">Delete
</a>| <a href= "code.php? id =<?php echo $row->question 1;?>" onclick= "return confirm('Are you sure')">Edit</a>
</td>
</tr>
<? php } ?>