PHP Code:
function myUserPass(){
if ($row['FirstName'] == ""); {
return "<img width=11px src='../site_images/Cross.jpg' />";
}
}
Usually best to have your functions return data (in this case a string) and decide to echo it nearer the end of its journey.
PHP Code:
echo "Password: " . myUserPass() ;
That leaves the door open to doing things like this:
PHP Code:
$message = "<h3>Hello!</h3>";
// then some stuff
// then concatenate more info to the message
$message .= "Password: " . myUserPass() ;
// then finally, in a place in your code that makes more sense to echo stuff out:
if( $logged_in ){
echo $message;
}
Bookmarks