Any suggestions to show user messages, Something to avoid a lot of if/else statements.
if($row->num_rows > 1) {
ok
} else {
print "There is no...";
}
thanks!
Any suggestions to show user messages, Something to avoid a lot of if/else statements.
if($row->num_rows > 1) {
ok
} else {
print "There is no...";
}
thanks!
$err = array();
if(!$row->num_rows > 1) {
$err[]= "There is no...";
}
...
if (!$err) {
//ok. doing stuff
} else {
foreach ($err as $message) {
echo $message."<br>\n";
}
}