I would like to add the text ‘no records, please try again’ to search the search that comes up with nothing. Please be aware that I am a total beginner at this, the code I have is as following:
<?php
if (!empty($_REQUEST['term'])) {
$term = mysql_real_escape_string($_REQUEST['term']);
$sql = "SELECT * FROM search WHERE surname LIKE '%".$term."%' ORDER BY surname, fullname, conflictsort";
$r_query = mysql_query($sql);
while ($row = mysql_fetch_array($r_query)){
$id = $row['id'];
$initial = $row['initial'];
$surname = $row['surname'];
$fullname = $row['fullname'];
$dob = $row['dob'];
$born = $row['born'];
$service = $row['service'];
$enlisteddate = $row['enlisteddate'];
$enlisted = $row['enlisted'];
$number = $row['number'];
$rank = $row['rank'];
$batt = $row['batt'];
$unit = $row['unit'];
$section = $row['section'];
$died = $row['died'];
$death = $row['death'];
$memorial = $row['memorial'];
$conflict = $row['conflict'];
$conflictsort = $row['conflictsort'];
$biography = $row['biography'];
$link = $row['link'];
echo"<h4>$surname</h4>
<b>Name:</b> $fullname - <b>Rank:</b> $rank ($number) - <b>Regiment:</b> $batt $unit $section
<br /><b>Birth:</b> $dob $born
<br /><b>Enlisted:</b> $service - $enlisteddate $enlisted
<br /><b>Died:</b> $died $death
<br /><b>Memorial:</b> Shown as $initial$surname at $memorial
<br /><b>Confilct:</b> $conflict
<br /><b><a href='$link'>$biography</a></b>
<br /><br /><br />";
}
}
?>