title('

Healthy Tips & Info.','tiptitlebox');
?>
|
include('includes/homepage_leftbar.php');
?>
|
if($_GET['qs_id']=="")
{
$sql = "select *, h.name as user_name, h.country as user_country, c.name as county, s.name as country2, h.id as tipID from healthytips h, user u, counties c, countries s where approved='1' AND u.id=h.user_id AND u.county = c.id AND u.country=s.id";
if (strlen($keyword))
$sql .= " AND h.tip like '%".$keyword."%'";
if (strlen($categoryID))
$sql .= " AND h.categoryID = '".$categoryID."'";
$sql .= " order by date_posted DESC";
}
else
{
$sql = "select *, h.name as user_name, h.country as user_country, c.name as county, s.name as country2, h.id as tipID from healthytips h, user u, counties c, countries s where approved='1' AND u.id=h.user_id AND u.county = c.id AND u.country=s.id AND h.id=$_GET[qs_id]";
}
$query = mysqli_query($conn,$sql);
$total = mysqli_num_rows($query);
$sql .= " limit $offset, $show";
$query = mysqli_query($conn,$sql);
$i = 0;
while ($row = mysqli_fetch_array($query)) {
if (($i>0) && ($i%2))
$color = '#f6f6f6';
else
$color = '$ffffff';
?>
$name = strlen($row['user_name']) ? stripslashes($row['user_name']) : $row['firstname'].' '.$row['surname'];
$city = strlen($row['city']) ? stripslashes($row['city']) : $row['county'];
$country = strlen($row['user_country']) ? stripslashes($row['user_country']) : $row['country2'];
?>
By: - , United States |
$i++;
}
?>
if ($total > $show) {
?>
}
?>
|
include('includes/right_colWA.php');
rightcol();
?>
| include('includes/bottom.php');?>
|