-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo_session2.php
More file actions
42 lines (40 loc) · 1.1 KB
/
demo_session2.php
File metadata and controls
42 lines (40 loc) · 1.1 KB
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
<?php
// session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>demo session2</title>
</head>
<body>
<?php
// echo session variables creaed on previous page
// echo "Favorite color is " . $_SESSION["favcolor"] . ".<br>";
// echo "Favorite animal is " . $_SESSION["favanimal"] . ".";
// print_r($_SESSION);
// remove all session variables
// session_unset();
// destroy session
// session_destroy();
?>
<!-- <table>
<tr>
<td>Filter Name</td>
<td>Fileter ID</td>
</tr> -->
<?php
// foreach(filter_list() as $id => $filter){
// echo '<tr><td>' . $filter . '</td><td>' . filter_id($filter) . '</td><tr>';
// }
$str = 0;
$newstr = filter_var($str, FILTER_SANITIZE_STRING);
echo $str . "<br>" . $newstr . "<br>";
if(filter_var($str, FILTER_VALIDATE_INT) === 0 || !filter_var($str, FILTER_VALIDATE_INT) === false){
echo("Integer is valid!");
} else {
echo("Integer is invalid!");
}
?>
<!-- </table> -->
</body>
</html>