Created
May 3, 2020 10:44
-
-
Save dikiwidia/34d64b1167b1b4003aa939b2f5d9e0ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="<?php $_SERVER["PHP_SELF"]; ?>" method="post"> | |
<input type="text" name="user"> | |
<input type="submit" value="Kirim"> | |
</form> | |
<?php | |
// Variabel biasa | |
$nama = "Moch Diki Widianto"; | |
$angka_pertama = 4; | |
$angka_kedua = 2; | |
// Variabel super global | |
// $output = $_GET['user']; | |
$output = $_POST['user']; | |
// operator PHP | |
// Ini komentar saya. | |
/* | |
Ini adalah | |
Komentar Saya | |
di PHP | |
*/ | |
echo "Saya adalah ".$nama; | |
echo "<br />"; | |
echo "Hasilnya adalah: ".$angka_pertama ** $angka_kedua; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment