
Originally Posted by
freecrm
I only have one problem now.
At the top of the script is a recordset created of users (RS_Users). I have a form with 3 fields (drop-down) which calls this recordset and it isn't calling results from the recordset!
I have butchered this script so many times now, there's probably a simple error but I can't find it!
Ideally, I would have alist drop-down with multiple selections but I haven't got a clue how to do this.
Code:
<?php
// create recordset of users
mysql_select_db($database_freecrm, $freecrm);
$query_RS_Users = "SELECT `USERNAME` FROM CONTACTS ORDER BY `USERNAME` ASC";
$RS_Users = mysql_query($query_RS_Users, $freecrm) or die(mysql_error());
$row_RS_Users = mysql_fetch_assoc($RS_Users);
$totalRows_RS_Users = mysql_num_rows($RS_Users);
?>
........blah blah
..............<html blah.....
User:
<select name="selectuser" id="selectuser">
<?php
while ($row_RS_Users = mysql_fetch_assoc($RS_Users))//loop through results
{
$curuser = $row_RS_Users['USER'];
echo '<option value="'. $curuser . '" ';
if ($curuser == $selecteduser)
{
echo " selected";
}
echo ">" . $curuser . "</option>";
}
?>
You used `USERNAME` in your query and you were expecting to get 'USER'?
also about
Code:
$linkDate = mktime (0,0,0, $month, $day, $year);//create minimum parameter
$linkDateEnd = mktime(23,59,59, $month, $day, $year);// create maximum parameter
.......
WHERE EVSTART > '$linkDate' AND EVSTART < '$linkDateEnd'
that's just until 23:59:58 dunno about 0:00:00 though
using weekday for colspan was really ingenious xD