- This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
i want to control my content by click menu such as i click home and content will show about home.
please help me what should i do
following is is my menu.php code
<div id="menu">
<div id="menumain">
<?php
include_once(‘config.php’);
$result = mysql_query("SELECT * FROM page ");
while($row = mysql_fetch_array($result))
{
?>
<a href="?pageid=<?php echo $row; ?>"><?php echo $row; ?> </a>
<?php
}
?>
</div>
</div>
following is my index.php code
<?php include_once(‘config.php’);?>
<?php include_once(‘header.php’); ?>
<?php include_once(‘menu.php’);?>
<div id="content">
<?php include_once(‘sidebar.php’); ?>
<div id="maincontent">
<!– include_once(‘config.php’);–>
<?php
if(isset($_GET))
{
$result=mysql_query("select content from page where id=’pageid’");
echo ‘$result’;
}
?>
</div>
<div id="space"></div>
</div>
<?php include_once(‘footer.php’); ?>
I may be off base here, but given the last post of yours I read, it sounds like you want us to do the work for you. You obviously know some PHP and the sample code you gave basically has what you want; when you get a request with querystring pageid=5 you just want to pull out a different field from the database and since you already know how to get info from the database, that’s not the issue; in fact, I’m not really sure what the problem is.