PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
It is good practice if not mandatory to use quotes in your database vars.
I work with informix where quotes are required.
Try this to ensure that you are getting the expected output from the database. It looks as though you go through the while loop twice but never satisfy all three conditions necessary to print the username.
I do normally include qoutes in my db vars, but I couldn't think of anything else that could be wrong, so I thought maybe it could be that, obviously i was wrong
I found out what it was, $dateday should have been $datemonth and vice versa.
Only problem is, its still printing "No Clients To Pay" even when there are usernames to print.
Its got to be something to do with the else.... i think!
Use flags in each condition to find out where the problem lies. Also, echo out the $query and insert it nativly into the database (if you can) to see exactly what that query returns.
Also, something else to check: is the data stored as strings or ints in the database?
<?
$query = mysql_query("SELECT * FROM cdc_clients");
echo $query."\n";
if ($viewї'paymentduemonth'] == "$datemonth")
{
if ($viewї'paymentdueday'] == "$dateday")
{
if ($viewї'paymentdueyear'] == "$dateyear")
{