1.masukkan coding ini di atas tag <html> dgn nama file "validator.php"
<?php
if(isset($_POST['submit'])){//apakah data tersubmit
$nama=$_REQUEST['nama'];
if(isset($_POST['gender'])){
$gender=$_REQUEST['gender'];
}
else{
$gender='';
}
$cek='';
<?php
if(isset($_POST['submit'])){//apakah data tersubmit
$nama=$_REQUEST['nama'];
if(isset($_POST['gender'])){
$gender=$_REQUEST['gender'];
}
else{
$gender='';
}
$cek='';
<?php
if (isset($_POST['decimal'])){
$des = $_POST['decimal'];
$original = $_POST['decimal'];
$oct = '';
if (preg_match('/[^0-9]/',$des)) {
die ("Wrong Input");
<?php
if (isset($_POST['decimal'])){
$des = $_POST['decimal'];
$original = $_POST['decimal'];
$hex = '';
if (preg_match('/[^0-9]/',$des)) {
die ("Your Input Is Wrong!");
}
<?php
echo "Hello World";
?>

