View Single Post
Old 05-08-2009, 07:22 PM   #1 (permalink)
shankar
The Wanderer
 
Join Date: Apr 2009
Posts: 19
Thanks: 9
shankar is on a distinguished road
Default Jesus help me dynamic update in drop down

<form action="stud_attendance_report_month.php" name="select_date" method="POST">
View results of &nbsp;&nbsp;&nbsp;
<select name = "month" >
<?php
include("connect.php");

$query = mysql_query("SELECT * FROM stud_attendance WHERE username = 'srikant'");
$numrows = mysql_num_rows($query);
if ($numrows!=0)
{
$row = mysql_fetch_assoc($query);
$id = $row['stud_id'];
$thing = $row['date'];
$set_month = mysql_query("SELECT MONTHNAME('".$thing."') FROM stud_attendance");
$set_month_value = mysql_query("SELECT MONTH('".$thing."') FROM stud_attendance");
}
?>
<option value ="<?php echo $set_month_value;?>"><?php echo $set_month; ?></option>
<?php
}
?>
</select>
&nbsp;&nbsp;&nbsp;

<input id='button' type='submit' name='select_date' value='Submit' />
</form>


Am unable to get the output, it does not display any month name.
Can anybody help me, have to submit the project by evening.
__________________
--
Regards
Shankar
shankar is offline  
Reply With Quote