as the headline says, need help to print out content from db on my page,
i got a table with -> page_content, page_title, page_name.
i got 5 pages in that table, "Hem"(Home) "Om oss"(About us) "Support"(..) "Kontakt"(Contact) "Hitta hit" ( Find us).
Then on my pages, i got 5 <a href="./Index.php?page=""> Hem </a> for each page,
I want to print out the page_content for each page in db when i click on theese links, i have tried some stuff but dont get it to work,
this iswhat i got now, as you can se, the links are wrong, dont know how to do this, need this page to be done tomorrow :queasy:
require_once('./db_connect.php');
$get_pages = 'SELECT * FROM pages WHERE page_name="$page"';
$query_pages = mysql_query($get_pages);
while($object = mysql_fetch_object($query_pages)){
$hem = $object->page_name;
}
<div class="centerdiv" style="margin-top:20px; width:50%; height:60px; background-color:red; text-align:center;">
<a href="./Index.php?page=hem">Hem</a>
<a href="./Index.php?page=om oss">Om oss</a>
<a href="./Index.php?page=support">Support</a>
<a href="./Index.php?page=kontakt">Kontakt</a>
<a href="./Index.php?page=hitta hit">Hitta hit</a>
</div>
<div id="main" class="centerdiv" style="width:75%; height:650px; background-color:green;">
INFO