What I am trying to achieve is to make a link behave like an include. By this I mean that I would like to click on a link and that action, instead of opening a webpage should cause a page to be included in the same webpage at a given place i.e. within the div where the include should takes place.
I came across a snippet of code that also tried to achieve the same effect. This code is as follows:
Code: Select all
switch($_GET['something'])
{
case 'page1':
include('page1.php');
break;
case 'page2':
include('page2.php');
break;
default:
include('error.php');
break;
Code: Select all
<a href= "MyPage"> View a special member page</a>
Right now it gives an undefined index 'something' error.
Thanks all !