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
<?php | |
$umur = 17; | |
// if else statement | |
if ($umur < 16){ | |
echo "Wah Masih muda ya!"; | |
}elseif ($umur = 17) { | |
echo "Umur kamu 17, yang semangat belajarnya"; | |
} else { |
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
<?php | |
//kodingan koneksi | |
$mysqli = mysqli_connect("localhost", "root", "", "sekolah"); | |
//get database | |
$result = mysqli_query($mysqli, "SELECT * FROM siswa ORDER BY id DESC"); | |
?> |
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
<?php | |
function ucapSalam() { | |
echo "Assalamualaikum"; | |
} | |
//cara panggil function | |
ucapSalam(); | |
function namaKeluarga($namaAwal) { |
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
<?php | |
//session_start(); | |
//if(! isset($_SESSION['loggedin'])) | |
//exit('akses dilarang, silahkan login dulu'); | |
include_once('config.php'); | |
$judul = "Tambah Post"; |
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
<?php | |
//session_start(); | |
//if(! isset($_SESSION['loggedin'])) | |
//exit('akses dilarang, silahkan login dulu'); | |
include_once('config.php'); | |
$judul = "Edit Post"; |
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
<?php | |
//session_start(); | |
//if(! isset($_SESSION['loggedin'])) | |
//exit('akses dilarang, silahkan login dulu'); | |
include_once('config.php'); | |
$id = $_GET['id']; |
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
<?php | |
session_start(); | |
include_once('config.php'); | |
$judul = "Login"; | |
$subjudul = ""; | |
$url_banner = "assets/img/home-bg.jpg"; | |
if(isset($_POST['submit'])){ |
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
class Converter { | |
companion object { | |
fun rupiah(number: Double): String{ | |
val localeID = Locale("in", "ID") | |
val numberFormat = NumberFormat.getCurrencyInstance(localeID) | |
return numberFormat.format(number).toString() | |
} | |
} | |
} |
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
package id.ihwan.bpr_training_java; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.widget.Toast; | |
public class MainActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { |
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
#include <stdio.h> | |
int main(void){ | |
printf("Welcome to C!\n"); | |
int angka1; | |
int angka2; | |
int jumlah; | |
int hasilKali; |
OlderNewer