I have 4 files admin.php index.php go1.php and go2.php admin.php needs to be connected with index.php in admin.php when I click on go1 button or option then index.php will show the contents of go1.php otherwise it will show the contents of go2.php I thought about using either switch or if statements, but I have no clue where to begin. index.php is the page as seen by public whereas admin.php is private so through admin.php I want to control index.php to switch between contents of go1.php and go2.php Any tutorial or help please
try something like this $buttonvalue = $_GET['button-name']; switch($buttonvalue) { case 'go1': include 'go1.php'; break; case 'go2': include 'go2.php'; break; } PHP: The admin page doesn't get involved unless you need the ability to change the content that you show the user but that doesn't sound likely.