Allow me to jump right in. I have a MySQL database set up like this:
| key | name | title | section | content |
Each of those is a field. The key field is the unique number of the row, the name is the actual file name of the page, the title is what it displays on the top of the page, the section helps organize the files into categories, and the content is the content.
Here is an example row:
| 0 | index | My Home Page | Music | This is my home page. Here is some content. |
So I want to pass the names of the pages in the URL. I want "mypage.php?page=index" to display the contents of the row with the title of index, and that row only. The only way I know of doing this is a while() loop and then adding in an if statement that says, if($mysql_line[name]==$_GET['page']) returns true, display the page, etc etc. Is there other way to do it? Can I somehow get MySQL only to return the row with the word "index" in the name field?
Thanks in advance,