Page 2 of 2
Re: display no results found
Posted: Mon May 07, 2012 4:38 pm
by Robert07
Just change where you echo that parameter to wherever in the document you want. As long as it is after the parameter is defined it will work.
Re: display no results found
Posted: Mon May 07, 2012 6:04 pm
by jonnyfortis
ok im sorry about this
i have now put this in the body
<?php
echo "<p>$noresults</p>";
?>
and it show all the time even if there are results
in the header we have
$results = mysql_num_rows($Recordset1);
$noresults = 'No results found';
if($results == 0) {
echo "<p>$noresults</p>";
}
if i run it without it being in the body it works fine
thanks
Re: display no results found
Posted: Mon May 07, 2012 6:10 pm
by jonnyfortis
its ok i have sorted it
in the header
$results = mysql_num_rows($Recordset1);
$noresults = 'No results found';
in the body
<?php
if($results == 0) {
echo "<p>$noresults</p>";
}
?>
thank you so much for your patience
thanks again