|
Hi Guys
I know i am probably trying to invent a wheel ! However, the only way i can learn the language is to try and build something with it. What better way than to build my CMS whereby i can use it in future.
Already created my database and am tryin to build a dynamic me.
The menu should pick up the title and url of the file from my database.
The address of the url is showing fine and i am struggling to put the title in that url. Below is my code:
<?php
require('testconnection.php');
// Request to pick up the menu title
$sql="SELECT * from content";
$cmd=mysql_query($sql);
if (!$cmd) {
exit('<p>Error performing query' .
'at this time.</p>');
}
while ($row=mysql_fetch_array($cmd))
{
$menu=$row['menu'];
$filename=$row['filename'];
echo '<p>' . '<a href="'. $_SERVER['PHP_SELF'].
'?showmenu='. $filename. '">'.
'$menu </a></p>';
}
?>
And the result i get on the browser is this:
$menu
$menu
$menu
$menu
$menu
$menu
$menu
Pls enlighten. Will keep trying even while i posted this. Thanks a million.
__________________
Please login or register to view this content. Registration is FREE
- Content is King! Let others’ see and hear you.
|