View sample-code-1.php
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 { |
View sample-code-2.php
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"); | |
?> |
View sample-code-3.php
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) { |
View update_post.php
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"; |
View create_post.php
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"; |
View delete_post.php
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']; |
View login.php
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'])){ |
View lifecycle.java
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) { |
View latihan1.c
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; |
View main.c
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 () | |
{ | |
int nomor_jurusan; | |
printf ("Masukkan Nomor Jurusan yang dipilih (1-3) : "); | |
scanf ("%d", &nomor_jurusan); | |
if (nomor_jurusan == 1) |
OlderNewer