query("select * from news where catname = 'Accademics'");
while($result = mysqli_fetch_array($acc))
{
$num = mysqli_num_rows($acc);
if($num>0)
{
echo '
'.$result[1].'
'.$result[2].'
';
}
else
{
echo '
There are currently no newsfeeds uploaded under this category.
Back
';
}
}
}
else if(isset($_GET['Cultural']))
{
$cult = $con -> query("select * from news where catname = 'Cultural Activities'");
while($result1 = mysqli_fetch_array($cult))
{
$num = mysqli_num_rows($cult);
if($num>0)
{
echo '
'.$result1[1].'
'.$result1[2].'
';
}
else
{
echo '
There are currently no newsfeeds uploaded under this category.
Back
';
}
}
}
else if(isset($_GET['Fundraising']))
{
$fund = $con -> query("select * from news where catname = 'Fundraising events'");
while($result2 = mysqli_fetch_array($fund))
{
$num = mysqli_num_rows($fund);
if($num>0)
{
echo '
'.$result2[1].'
'.$result2[2].'
';
}
else
{
echo '
There are currently no newsfeeds uploaded under this category.
Back
';
}
}
}
else if(isset($_GET['Sports']))
{
$sport = $con -> query("select * from news where catname = 'Sports'");
while($result3 = mysqli_fetch_array($sport))
{
$num = mysqli_num_rows($sport);
if($num>0)
{
echo '
'.$result3[1].'
'.$result3[2].'
';
}
else if ($num<1)
{
echo '
There are currently no newsfeeds uploaded under this category.
Back
';
}
}
}
?>