<?php
// setingan database
$server 'localhost';
$username 'root';
$password '';
$database 'nama_database';

if(
mysql_connect($server,$username,$password) or die ("ERROR: Failed to connect to MySQL")){
    
mysql_select_db($database) or die ("ERROR: Failed to connect to database \"$database\"");
}

// CONTOH URL: http://127.0.0.1:12345/Request?MSISDN=081328001234&DENOM=50&REF_ID=54321

// difilter untuk mencegah karakter berbahaya
$msisdn strip_tags(htmlspecialchars($_GET['MSISDN']));
$denom strip_tags(htmlspecialchars($_GET['denom']));
$ref_id strip_tags(htmlspecialchars($_GET['ref_id']));

if(
mysql_query("insert into namatabel('MSISDN','DENOM','REF_ID') values('$msisdn','$denom','$ref_id')")){
    echo 
'data masuk database';
}
else{
    echo 
'kok ora mlebu?';
}
?>