I am not very experienced in programming php and mySQL but I think the question I have should be quite simple to answer... only I don't get it!
I am trying to create a table that reads information from a MySQL database, I would like it to display a course which have want to be display in the current semester
i add a column have yes or no
then display in the table
this is my work :
<?php
include('con-db.php');
$query = "SELECT * from selected selected_course".
" WHERE selected_course.check = s_post['true'] ";
$result = mysql_query($query) or die(mysql_error());
while($r=mysql_fetch_array($result))
{
echo"<tr><td><center>".$r['coursename']."</td></center</tr>";
}
?>
and the table have the result is :
<table border="2" width="51%" bordercolorlight="#996633" bordercolordark="#5A3A0B" bordercolor="#5A3A0B"> <tr> <td width="29"><font color="#5A3A0B">No.</font></td> <td width="411"> <p align="center"><font color="#5A3A0B">Course Title and Code</font></td> <td width="29"><font color="#5A3A0B">Rate</font></td> </tr> </table>

New Topic/Question
Reply




MultiQuote




|