-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresponse.php
More file actions
29 lines (26 loc) · 854 Bytes
/
Copy pathresponse.php
File metadata and controls
29 lines (26 loc) · 854 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
//get data
$fname = filter_input(INPUT_POST, 'fname');
$lname = filter_input(INPUT_POST, 'lname');
$country = filter_input(INPUT_POST, 'country');
$phone = filter_input(INPUT_POST, 'phone');
$color = filter_input(INPUT_POST, 'color');
$order = $fname." ".$lname." ".$country." ".$phone." ".$color;
$old_content = file_get_contents("newfile.txt");
//open file
$myfile = fopen("newfile.txt", "w") or die("Unable to open file!");
fwrite($myfile, $order."||".$old_content);
$new_content = file_get_contents("newfile.txt");
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<span> <?php echo htmlspecialchars($order);exit; echo '<img src="p8.jpg" >' //echo $new_content;fclose($myfile); ?> </span> <!--to display all orers -->
<span> </span>
<p>your oreder is done <p>
<a href="page3.html">back</a>
</body>
</html>