Hello There, Guest! RegisterLogin with Facebook
Login with Facebook

New Anna University Nov / Dec 2016 Examination Important Questions
New Anna University (UG / PG) Nov/Dec 2016 and Jan 2017 Theory , Practical Exam Timetable
>>> Anna University Sixth Semester Question Bank Collection (R2013) ECE,MECH,CSE,IT,EEE,CIVIL,EIE
>>> Anna University November/December 2015 Examination Question Papers
>>> Anna University Study Materials for all Departments
>>> Anna University Question Papers : April May June 2015 Question Papers | Nov Dec 2014 and Jan 2015 Question Papers

Register or Login to Submit Study Materials , Shoutbox and also to access Many Features !!

Vidyarthiplus Shop :: Handwritten Premium Lecture Notes
Share your Study Materials with us
Share your Study Materials with us : Click Here

PHP Mutliple page in a single php file Switch Case
#1


This is a simple PHP code to create a multiple pages in a single php files using Switch case.

Hope it will be useful for beginners.


Here is the code :

Code:
<?php

// www.Vidyarthiplus.com

switch ($_GET['page']) {
case '1' :
echo 'This is page 1';
break;
case '2' :
echo 'This is page 2';
break;
case '3' :
echo 'Script from : www.Vidyarthiplus.com/vp';
break;
default:
       echo "put index.php?page=1 - to see First page";
}
?>

Copy and paste the code in your php page, such as index.php

Usage :
To open the first page :
http://www.ur site link.com/index.php?page=1

To open the second page :
www. ur site link.com/index.php?page=2

Bu using this u can use many pages in a single php file and default statement displays the main page without any page number.

Hope i explained clearly..Smile If u have any doubt feel free to post ur comment below.,..

For the student , by the student , to the student !!


Reply

Subscribe


Recommend on Google