Reply
Old 06-23-2014, 06:06 AM   #1 (permalink)
 
Status: Junior Member
Posts: 2



Default tell use get method in php i want to use get methods to reduce my web pages

It means I want to use one PHP page for multiple pages, which has same view. So i think I can drop pictures and news from database, instead of creating lots of similar multiple php pages.

AbelAnojan is offline   Reply With Quote
Old 06-23-2014, 06:06 AM   #2 (permalink)
 
Status: Junior Member
Posts: 3



Default tell use get method in php i want to use get methods to reduce my web pages

In yiur index.php page, start by creating a few links.

A href=index.php?page=home
A href=index.php?page=about
A href=index.php?page=services

Then use get to check the page parameter.

If ($_GET['page'] == "home") {
Echo "this is my home page";
}

If ($_GET['page'] == "about") {
Echo "this is my about page";
}

If ($_GET['page'] == "services") {
Echo "this is my service page";
}

That's as basic as it gets. There are other ways of doing it but this should get you started.
EmirM is offline   Reply With Quote
more..
Old 06-23-2014, 06:06 AM   #3 (permalink)
 
Status: Junior Member
Posts: 26



Default tell use get method in php i want to use get methods to reduce my web pages

"I want to use one PHP page for multiple pages"

Well in that case, the GET method won't help you there... You'll have to use:

include("mypage.php");
or
require("mypage.php");

these make it so you can use one page for multiple pages
DannyDonut is offline   Reply With Quote
Old 06-23-2014, 06:06 AM   #4 (permalink)
 
Status: Junior Member
Posts: 2



Default tell use get method in php i want to use get methods to reduce my web pages

And another example I can give you is, Check via Alt + D in this page. And see our url, which has what I was questioning about.
AbelAnojan is offline   Reply With Quote

Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dr.Java method and overloaded methods help in code? ovaisa Coding 1 10-10-2013 02:06 AM
JAVA: How do I have a method call two other methods? Tragedy1191 Coding 2 09-06-2013 10:07 AM
simple java question, how to call methods from the main method? al_saodiyya Oracle Databases 2 03-27-2013 11:06 AM
Java return method and using methods in methods? Unknown_User Coding 2 05-23-2012 03:12 PM
is calling methods from another method considered bad coding style? Unknown_User Coding 0 02-03-2012 08:36 AM