Jul 26, 2008

I Need Help...

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > PHP Programming

free web hosting

I Need Help...

Amezis
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...

Reply

Bouwie
Amezis i dont know sad.gif

Reply

Angelkiller
i don't no it.... sad.gif

Reply

Amezis
umm... do you know what I mean?

Reply

Neutrality
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.

 

 

 


Reply

alexia
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

Reply

mobious
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.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics
Looking for I, Need, Help...

Searching Video's for I, Need, Help...
advertisement



I Need Help...



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE