Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> I Need Help...
Amezis
post Feb 25 2005, 07:26 PM
Post #1


Privileged Member
*********

Group: Members
Posts: 535
Joined: 14-February 05
From: Oslo, Norway
Member No.: 3,759



I saw on a page that the adress was 'index.php?page=something.html'. I don't know anything in PHP, but I think the 'index.php' was the menu, and 'something.html' was the content. I think it works like a frame... Anyway... Can someone give me a code so I can do it, maybe a little tutorial too?
BTW the page i'm talking about can be found here...
Go to the top of the page
 
+Quote Post
Bouwie
post Feb 25 2005, 07:36 PM
Post #2


Newbie
*

Group: Members
Posts: 4
Joined: 25-February 05
Member No.: 3,985



Amezis i dont know sad.gif
Go to the top of the page
 
+Quote Post
Angelkiller
post Feb 25 2005, 07:38 PM
Post #3


Member [Level 1]
****

Group: Members
Posts: 50
Joined: 24-February 05
Member No.: 3,960



i don't no it.... sad.gif
Go to the top of the page
 
+Quote Post
Amezis
post Feb 25 2005, 07:52 PM
Post #4


Privileged Member
*********

Group: Members
Posts: 535
Joined: 14-February 05
From: Oslo, Norway
Member No.: 3,759



umm... do you know what I mean?
Go to the top of the page
 
+Quote Post
Neutrality
post Feb 25 2005, 11:28 PM
Post #5


Sheathed Motivation
*******

Group: Members
Posts: 126
Joined: 19-February 05
From: Canada
Member No.: 3,868



I know what you are talking about. What you're seeing is a variable being passed to the browser. This is very common in php-based websites. Instead of creating multiple pages for a website, you can use a variable to indicate what content you
want to show. For example:

CODE

echo "<a href='index.php?page=pagetwo'>Some Page</a>";

if($page=="" or $page=="home")
{
    echo "Welcome to my website! I hope you enjoy it.";
}
else
{
    if($page=="pagetwo")
    {
          /* Let's assume that this code here is index.html */
          echo "This is the second page on my website. ";
    }
}


This code should help you understand why there was a webpage's name behind a variable. I hope it does.

By the way, you're partly right when you said that "index.php" is a menu and
"something.html" a choice. But, it's not a frame. Not at all. It's a page "generated"
by the .php file. Well, it's not a "page" really, but you get the idea.
Go to the top of the page
 
+Quote Post
alexia
post Feb 27 2005, 10:04 PM
Post #6


Super Member
*********

Group: Members
Posts: 310
Joined: 9-February 05
From: Italian
Member No.: 3,677



U Can Make PHP Page with If (Fun)
For Example u set if index.php?action=alex
then your iframe browse to yahoo.com
and you can many think in this option

you can manage 100 ta html page with this Fun
you can write 100 ta if and 100 html site and user can Switch with this options
Nice Job wink.gif
Go to the top of the page
 
+Quote Post
mobious
post Feb 28 2005, 12:25 PM
Post #7


Advanced Member
*******

Group: Members
Posts: 113
Joined: 14-January 05
From: Philippines
Member No.: 3,271



you can also make the page redirect to the given url.

CODE
$page = $_GET['page'];

header("Location: $page");


this is much more efficient since you do not have to fill one html file with all the html tags for your pages.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

 



- Lo-Fi Version Time is now: 11th October 2008 - 11:27 AM