Hello.
I try to get my simplet PHP page function. I use PHP for a navigation menu.
In menu.inc it looks like this:
<a href="?p=replayes.inc">Replayes</a>
<a href="?p=index.inc">Home</a>
etc.
But what do i write where the text is about to get shown? In index.php.
Linke sider: ="?p...
Moderator: General Moderators
Re: Linke sider: ="?p...
could you rephrase your question?
Re: Linke sider: ="?p...
Ok..
I got this menu.inc file. It sayes:
<a href="?p=index.inc">Home</a><br>
<a href="?p=info.php">Info</a><br>
++
But how do i get mye index.php to show this "index.inc" and "info.inc" when click the link?
I got this menu.inc file. It sayes:
<a href="?p=index.inc">Home</a><br>
<a href="?p=info.php">Info</a><br>
++
But how do i get mye index.php to show this "index.inc" and "info.inc" when click the link?
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Linke sider: ="?p...
Yes, but i want the text in ex. index.inc to get shown in the index.php.
With this i just have to have one page (index.php). and a lot of *.inc dokuments with text.
This texts will be shown in index.php when pressing the link to the *.inc file.
U see what i mean?
With this i just have to have one page (index.php). and a lot of *.inc dokuments with text.
This texts will be shown in index.php when pressing the link to the *.inc file.
U see what i mean?
Re: Linke sider: ="?p...
is kind of hard to understand why you want to bring the text to index.php
with an <a href="url">xxx</a> your pages moves to the url.
Another thing is that your could have a div on index.php and you want to load external data into that div when clicking on the link. Is this what you want???
with an <a href="url">xxx</a> your pages moves to the url.
Another thing is that your could have a div on index.php and you want to load external data into that div when clicking on the link. Is this what you want???
- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
Re: Linke sider: ="?p...
if you want the data that is located in the file index.inc to load into some spot on your current page then do something like this:
Code: Select all
if (!empty($_GET['p']))
{
switch $_GET['p']
{
case 'index.inc':
require_once 'index.inc';
break;
case 'info.inc':
require_once 'info.inc';
break;
}
}
[syntax=php][/syntax]Re: Linke sider: ="?p...
Another thing is that your could have a div on index.php and you want to load external data into that div when clicking on the link. Is this what you want???
This is what i ment.. i use a div and want external data into that.. someone?