Hello There, Guest! RegisterLogin with Facebook
Login with Facebook

Anna University TNEA 2018 Rank List Published. Login to know your Rank.
Anna University April May 2018 Exam Results
Anna University Latest News , Updates and Announcements
>>> 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 !!

Possibly Related Threads...
Thread Author Replies Views Last Post
  Fundamentals of Programming - PROGRAM USING while (),for(),switch() Yuvamalathi Velmani 1 742 06-08-2014, 07:44 AM
Last Post: Srini
  file handling in c Anandhakumar 0 552 01-11-2012, 08:43 PM
Last Post: Anandhakumar


Recommend on Google

Vidyarthiplus Whatsapp