Postingan

Menampilkan postingan dari Oktober, 2017

Cara Buat Pemesanan Hotel Online

Gambar
Cara Buat Pemesanan Hotel Online Buatkan Class CustomHtppClient.java package com.wilis; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URI; import java.util.ArrayList; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.HttpClient; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.conn.params.ConnManagerParams; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.params.HttpConnectionParams; import org.apache.http.params.HttpParams; public class CustomHttpClient { /** The time it takes for our client to timeout */ public static final int HTTP_TIMEOUT = 30 * 1000; // milliseconds /** Single instance of our HttpClient */ private static HttpClient mHttpClient; /** * Get our single instance of our ...

Crud Input Dengan JSON Dan Database MYSQL

Gambar
 Langka Awal Buatkan file php dengan nama server.php <?php $server = "localhost"; $username = "root"; $password = ""; $database = "pakaian"; mysql_connect($server, $username, $password) or die("<h1>Koneksi Mysql Error :  </h1>" . mysql_error()); mysql_select_db($database) or die("<h1>Koneksi Kedatabase Error : </h1>" . mysql_error()); @$operasi = $_GET['operasi']; switch ($operasi) { case "view": $query_tampil_pakaian = mysql_query("SELECT * FROM db_pakaian")  or die(mysql_error()); $data_array = array(); while ($data = mysql_fetch_assoc($query_tampil_pakaian)) { $data_array[] = $data; } echo json_encode($data_array); break; case "insert": /* Source code untuk Insert data */ @$merk = $_GET['merk']; @$jenis = $_GET['jenis']; @$ukuran = $_GET['u...