Hello There, Guest! RegisterLogin with Facebook
Login with Facebook

>>> Anna University Sixth Semester Question Bank Collection (R2013) ECE,MECH,CSE,IT,EEE,CIVIL,EIE
>>> 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

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 :


// www.Vidyarthiplus.com

switch ($_GET['page']) {
case '1' :
echo 'This is page 1';
case '2' :
echo 'This is page 2';
case '3' :
echo 'Script from : www.Vidyarthiplus.com/vp';
       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 !!



Recommend on Google