-
Notifications
You must be signed in to change notification settings - Fork 2
/
test.php
29 lines (24 loc) · 1.16 KB
/
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
<html>
<script type="text/javascript">
function myFunction(){
document.getElementById('form_').submit();
}
</script>
<form id="form_" action="test.php" method="get">
<select name="select" id="select" onchange="myFunction()">
<option <?php if (isset($_GET['select']) && $_GET['select']=='Newest') {echo"selected";} ?> value="Newest" id="Newest">Newest</option>
<option <?php if (isset($_GET['select']) && $_GET['select']=='Popular') {echo"selected";} ?> value="Popular" id="Popular">Popular</option>
</select>
</form>
<?php
if (isset($_GET['select'])) {
if ($_GET['select']=='Newest') {
echo"newest";
}else{
echo"popular";
}
}
$a="";
echo strlen($a);
?>
</html>