hi i want to direct my website to different pages
If there are competions that are active to show the page list of them else go to other page
i tried this but no luck
<?php
include_once "connect_to_mysql.php";
$extract = mysql_query("select * from tbl_competition WHERE fld_closed='N'");
while ($row = mysql_fetch_assoc($extract))
if ($rows <= 0) {
header( 'Location: nocompetition.php' ) ;
}
if ($rows > 0) {
header( 'Location: competition.php' ) ;
}