Yes, is that possible.
I want to print some text depending on the result of a database-query, above the output of the database-query.
I do this now, but it doesn't work:
function TextMessage($myname)
{
if ($myname != '')
{
echo "<h1>Welcome to my homepage</h1>";
}
else
{
echo "<h1>Your are not welcome here!</h1>";
}
}
...mysql_qery this and that...
for each mysql_fetch_array
{
echo "Firstname: $fetch["firstname"]
echo "Lastname: $fetch["lastname"]
}
if ($a_name_was_found)
{
TextMessage($the_found_name)
}
...end mysql_query_stuff ...
I want this to be a possible outcome:
<h1>Welcome to my homepage</h1>
Firstname: John
Lastname: Doe
Is it possible??