Skip to content

Instantly share code, notes, and snippets.

@od3n
Last active March 22, 2017 22:09
Show Gist options
  • Save od3n/59ec346b5a506685c7995e917ab765c3 to your computer and use it in GitHub Desktop.
Save od3n/59ec346b5a506685c7995e917ab765c3 to your computer and use it in GitHub Desktop.
<?php
if ($_SERVER['REQUEST_METHOD']=='POST')
{
if (isset($_POST['Type'])) // check jika $_POST['Type'] ada set
{
$eType=$_POST['Type'];
} else {
$eType="Input empty";
}
echo $eType; // keluarkan output $_POST['Type']
}
@alifmdshah
Copy link

alifmdshah commented Mar 22, 2017

`<?php
if ($_SERVER['REQUEST_METHOD']=='POST')
{
$Type=$_POST['Type'];
if (isset($_POST['Type'])) // check jika $_POST['Type'] ada set
{
echo $Type;
}
elseif( $Type='')
{
echo "Empty";
}

}`

@alifmdshah
Copy link

<?php if ($_SERVER['REQUEST_METHOD']=='POST') { if (empty($_POST['Type'])) { $eType="Input empty"; } else { $eType=$_POST['Type']; } echo $eType; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment