<?
$a=3;
$a == "1" ? $msg="1" : $msg="2";
echo $msg;
?>
<?if($a==3) echo "ok": echo "no"?>
<?=$a==3?"ok":"no"?>
$section = isset($_GET['section']) ? $_GET['section'] : '';
$section2 = isset($_GET['section']) ? $_GET['section2'] : '';
$search = isset($_GET['search']) ? $_GET['search'] : '';
$page = isset($_GET['page']) ? $_GET['page'] : '';
$s_type = isset($_GET['s_type']) ? $_GET['s_type'] : '';
$s_type2 = isset($_GET['s_type2']) ? $_GET['s_type2'] : '';
$s_type3 = isset($_GET['s_type3']) ? $_GET['s_type3'] : '';
$sort = isset($_GET['sort']) ? $_GET['sort'] : '';
$s_year = isset($_GET['s_year']) ? $_GET['s_year'] : '';
GET POST 2개 다 받는 $_REQUEST
$uid = isset($_REQUEST['uid']) ? trim($_REQUEST['uid']) : null;
array
$uid = isset($_REQUEST['uid']) ? $_REQUEST['uid'] : null;
php7
$page = $_GET['page']??'';
$page = $_REQUEST['page']??'';
==================================================
if(isset($_REQUEST)) {
foreach($_REQUEST as $key => $value) {
$value= $Ins_News_util-> sql_inject($value);
${"$key"} = isset($value) ? $value : null;
}
}
==================================================
////////////////////////////////////////////////////////////////////////
if(isset($_REQUEST)) {
foreach($_REQUEST as $key => $value) {
$value= $Ins_News_util-> sql_inject($value);
${"$key"} = isset($value) ? $value : null;
}
}
/////////////////////////////////////////////////////////////////////////////
$var_set=array("d_mode","news_level_m","page","s_type","s_type2","s_type3","section2","news","search","section","sort");
foreach($var_set as $key=>$value) {
${"$value"} = isset($_REQUEST[$value]) ? trim($_REQUEST[$value]) : null;
}