B
blackmoonwhitesun
Guest
how can i combine this one:
if(isset($_GET['show_cat']) && preg_match('/^[1-9]{1}[0-9]{0,}$/', $_GET['show_cat']))
{
$category = $_GET['show_cat'];
}
else
$category = 1;
with this one?
<?PHP
if($_POST['do'] == "search" or $_GET['dosearch'] == "yes"){ $subaction = "search"; $dosearch = "yes"; include("./search.php"); }
else{$number= 1; include("./show_news.php"); }
?>
i tried this but it doesnt work :/ :
<?PHP
if(isset($_GET['show_cat']) && preg_match('/^[1-9]{1}[0-9]{0,}$/', $_GET['show_cat']))
{
$category = $_GET['show_cat'];
}
else
$category = 1;
if($_POST['do'] == "search" or $_GET['dosearch'] == "yes"){ $subaction = "search"; $dosearch = "yes"; include("./search.php"); }
else{$number= 1; include("./show_news.php"); }
?>
thank u
if(isset($_GET['show_cat']) && preg_match('/^[1-9]{1}[0-9]{0,}$/', $_GET['show_cat']))
{
$category = $_GET['show_cat'];
}
else
$category = 1;
with this one?
<?PHP
if($_POST['do'] == "search" or $_GET['dosearch'] == "yes"){ $subaction = "search"; $dosearch = "yes"; include("./search.php"); }
else{$number= 1; include("./show_news.php"); }
?>
i tried this but it doesnt work :/ :
<?PHP
if(isset($_GET['show_cat']) && preg_match('/^[1-9]{1}[0-9]{0,}$/', $_GET['show_cat']))
{
$category = $_GET['show_cat'];
}
else
$category = 1;
if($_POST['do'] == "search" or $_GET['dosearch'] == "yes"){ $subaction = "search"; $dosearch = "yes"; include("./search.php"); }
else{$number= 1; include("./show_news.php"); }
?>
thank u