Skip to content

Commit

Permalink
Pertemuan 9 - Praktikum 8
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Apr 17, 2024
1 parent 94bbaff commit f0ed281
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
23 changes: 23 additions & 0 deletions pertemuan9/sessionCall.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

session_start();
?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>

<?php

echo "favorite color is " . $_SESSION["favcolor"]. ".<br>";
echo "favorite animal is " . $_SESSION["favanimal"]. ".";

?>

</body>
</html>
26 changes: 26 additions & 0 deletions pertemuan9/sessionCreate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

session_start();


?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>

<?php

$_SESSION["favcolor"] = "green";
$_SESSION["favanimal"] = "cat";
echo "Session variables are set."

?>

</body>
</html>

0 comments on commit f0ed281

Please sign in to comment.