I am new to php and mySQL but i do have some experience in ASP and msSQL.
Currently i am developing a web application for my organization,
About the project
I am using Frames for this application and it has three frames
Frame 1: It contains the MAINLIST - One, Two, Three, Four, Five ...... (It is invoked from a table in MySQL, Its also an Image)
Frame 2: It contains the List - A [One], B [One], C [Two], D [Two], E [Three] (It is invoked frm a table in MySQL, No Image)
Frame 3: Content Page.
Now, If the user clicks on Mainlist one, it has to display the content of the List i.e. 'A' and 'B'. These A and B belongs to the Category 'One' as shown in the Square Braces...and If the user clicks on Mainlist two, it has to display 'C' and 'D' which belongs to category 'Two'.
The List table also contain a column to specify the category.
tbl_MainList
One
Two
Three
Four
Five
tbl_List
A One
B One
C Two
D Two
E Three
The code I have used to display is below, I think i should use the WHERE clause, but unable to do it, as i have lack of experience.
<?php
$result = mysql_query("SELECT * FROM tbl_mainlists");
while ($row = mysql_fetch_array($result))
{
echo "<td align='center' valign='middle' width='70'><a href='".$row['link']."' target='list'><img src='images/30x30/".$row['image'].".gif' border='0'><BR><font size=2><b>".$row['name']."</b></td></a>";
}
mysql_free_result($result);
mysql_close();
?>
😕