HEllo ...
I read in the book about the case and switch commands.
I made my index.php file like that:
Code:
<?php include('.include/headermain.php'); ?>
<?php
// main links
switch ($_GET['id']) {
case 'en_1':
include('.include/main.php');
break;
case 'en_2':
include('.include/contact.php');
break;
case 'en_3':
include('.include/skills.php');
break;
case 'en_4':
include('.include/about.php');
break;
case 'en_5':
include('.include/stats.php');
break;
// Mail link
case 'mail':
include('.include/sendeail.php');
break;
// End Mail link
default:
include('.include/main.php');
break;
}
// end main links
?>
<?php include('.include/footer.php'); ?>
You can see here I have my whole page devided in three sections.
Header, main and footer.
The URL will be generated in the browser as
www.mypage/index.php?id=en_1 for the main part and
www.mypage/index.php?id=en_2 for the contact part.
What I want?
Inside my main sections like main.php, skills.php, contact.php or about.php I want to add a link to another page in side my .include folder.
How can I get it to work so the browser generates an URL in the addressbar looking like this:
www.mypage/index.php?id=en_1&main=something
or from mine skills page:
www.mypage/index.php?id=en_3&skills=something.
Can I make it with variables ..
I do not know how to start?
Shall I make another switch php file?
Shall I somehow insert any code and how inside my index.php?
What is the best sollution doing it?
Thanx for all help!