I am experimenting with PHP. This is my func.php
function returnBlankStylist(){
$sql=mysql_query("SELECT * FROM `".$dbn."`.`stylist` WHERE `stylist`.`customer_id`='1'");
if (mysql_affected_rows()==0) {
return false;
} else {
return true;
}
}
This is my page.tpl
<?php if (returnBlankStylist==false){?>
<div class="center graybox"> Please enjoy this discount since this you have never filled out a query before</div>
<? }?>
If the customer Id 1 exists it shows the message, and if the customer Id 1 does not exist it shows the message?