I havent touched php for a very long while, but have a little issue with the code below thats bringing up the errors, but all seems fine to me, I cant work it out.
$db="1";
$host="2";
$user="3";
$pass="4";
$link=mysqli_connect($host,$user,$pass,$db);
$q=mysqli_query($link, "select TID, TITLE, DATE, PIC, ATTACHMENT, DESCRIPTION FROM TCOACHING WHERE (ACTIVE=1) AND (TITLE=1) ORDER BY TID DESC");
while($g=mysqli_fetch_assoc($q)){
$id = $g['TID'];
$name = $g['TITLE'];
$date = $g['DATE'];
$pic = $g['PIC'];
$attachment = $g['ATTACHMENT'];
$description = $g['DESCRIPTION'];
Errors
Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in /home/hp3-linc3-nfs1-x/053/938053/user/htdocs/junior-coaching.php on line 139
Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, null given in /home/hp3-linc3-nfs1-x/053/938053/user/htdocs/junior-coaching.php on line 140