i would use the following snippet to find out the date of the 1st of the month....
//gets current date in YYYY-MM-DD format eg. 2005-01-17
$current_date = date("Y-m-d");
//gets date in YYYY-MM-DD for first of the month eg. 2005-01-01
$first_of_month = substr($current_date,0,8)."01";
this gives you the date of the first of the month then just add this to your query, and you get the following.
<?php
//set paramenets
$dbhost = 'xxxxxx';
$dbuser = 'xxxxx';
$dbpass = 'xxxxx';
$dbname = 'bahs80_dante';
$dbtabl = 'users';
$dbcon = mysql_connect($dbhost, $dbuser, $dbpass) OR die('could not connect to MySQL: ' . mysql_error());
mysql_select_db ($dbname) OR die('could not connect to database: ' . mysql_error());
//gets current date in YYYY-MM-DD format eg. 2005-01-17
$current_date = date("Y-m-d");
//gets date in YYYY-MM-DD for first of the month eg. 2005-01-01
$first_of_month = substr($current_date,0,8)."01";
//add limit if you dont want more than a cirtain amount of results
//e.g. add LIMIT 30 to get newest 30
$sql = "SELECT * FROM users WHERE joindate > {$first_of_month} ORDER BY joindate DESC";
$result = mysql_query($sql) or die('Failed to execute ' . $sql . ' due to ' . mysql_error());
// generate and display result
while ($row = mysql_fetch_array($result))
{
echo '<table border="1">';
echo '<tr>';
echo '<td>';
echo $row['last'] . ', ';
echo $row['first'] . '<br>';
echo $row['address'] . '<br>';
echo $row['city'] . ', ';
echo $row['state'] . ' ';
echo $row['zipcode'] . '<br>';
echo $row['joindate'] . '<br>';
echo '</td>';
echo '</tr>';
echo '</table>';
}
?>
i have also changed $sql to take out the quotes around the field names that arnt needed there.
if this doesnt work post again with any problems.