-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.php
39 lines (36 loc) · 820 Bytes
/
test.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
<?php
session_start() ;
if (isset($_POST["submit"]) ) {
if ($_POST["seatname"] != ""){
if ($_SESSION["array"] != "") {
$_SESSION["array"] .= "," ;
}
}
$_SESSION["array"] .= $_POST["seatname"] ;
}
else {
$_SESSION["array"] = "" ;
}
$demo = $_SESSION["array"];
?>
<html>
<style>
.seats {
display: inline;
padding: 20px;
font-size: 15.5px;
border-radius: 5px;
background-color: rgb(185,222,160);
color: white;
font-weight: bold;
border: 0;
}
</style>
<body>
<form action="" method="post">
<input id="age" type="text" name="seatname" value="" style="display: none"/>
<button type="submit" class="seats" name = "submit">Submit</button>
</form>
<p id="demo"><?php echo $demo ?></p>
</body>
</html>