Skip to content

Instantly share code, notes, and snippets.

View tutweb's full-sized avatar

Tutorial Web Design tutweb

  • Tutweb
  • Indonesia
View GitHub Profile
@tutweb
tutweb / contact-form-email.php
Last active May 8, 2022 08:37
Contoh form kontak dengan PHP yang terkirim ke email
<?php
$statusMsg = '';
$msgClass = '';
if(isset($_POST['submit'])){
// Get the submitted form data
$email = $_POST['email'];
$name = $_POST['name'];
$subject = $_POST['subject'];
$message = $_POST['message'];
@tutweb
tutweb / write-json-file.php
Created October 6, 2016 14:36
Write JSON file with PHP
<?php
// array
$array = Array (
"0" => Array (
"id" => "USR1",
"name" => "Steve Jobs",
"company" => "Apple"
),
"1" => Array (
"id" => "USR2",
@tutweb
tutweb / post-receive-json-php-curl.php
Created August 13, 2017 17:09
Mengirim dan menerima data JSON dengan PHP cURL
<?php
//API URL
$url = 'http://www.contohweb.com/api';
//create a new cURL resource
$ch = curl_init($url);
//setup request to send json via POST
$data = array(