display no results found
Moderator: General Moderators
Re: display no results found
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.
-
jonnyfortis
- Forum Contributor
- Posts: 462
- Joined: Tue Jan 10, 2012 6:05 am
Re: display no results found
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
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
-
jonnyfortis
- Forum Contributor
- Posts: 462
- Joined: Tue Jan 10, 2012 6:05 am
Re: display no results found
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
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