What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » General » General Chit Chat » More Website Help Please

More Website Help Please
Author: Message:
Eddie
Veteran Member
*****


Posts: 2078
Reputation: 30
33 / Male / Flag
Joined: Oct 2005
Status: Away
O.P. More Website Help Please
I have come across a problem, where i have had to recode my website to suit certain things that have to be placed on the site...i have seen on websites like this that it says  "index.php?action=page.php" on the pages. You can see similar on a website called HabboParadise.com when you click a link.

Can someone please lead me to a tutorial or tell me how to do this please :)

This post was edited on 01-17-2007 at 11:50 AM by Eddie.
01-17-2007 11:49 AM
Profile PM Web Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: More Website Help Please
Look at this:

http://www.php.net/manual/en/reserved.variables.p...rved.variables.get
[Image: 1-0.png]
             
01-17-2007 12:14 PM
Profile PM Web Find Quote Report
Eddie
Veteran Member
*****


Posts: 2078
Reputation: 30
33 / Male / Flag
Joined: Oct 2005
Status: Away
O.P. RE: More Website Help Please
Ok i dont even understand that :( Oh well, have some learning to do.
01-17-2007 12:24 PM
Profile PM Web Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
30 / Male / Flag
Joined: Apr 2006
Status: Away
RE: More Website Help Please
code:
<?php
$page = $_GET["page"];
?>
<html>
<?php
switch($page){
    case "contact":
        ...
    break;
    default:
        ...
    break;
}
?>
</html>
so ?page=contact will display the contact page, and if nothing is specified or any thing with doesn't exist is specified it shows the default page.

This post was edited on 01-17-2007 at 01:57 PM by Felu.
01-17-2007 01:32 PM
Profile E-Mail PM Web Find Quote Report
Eddie
Veteran Member
*****


Posts: 2078
Reputation: 30
33 / Male / Flag
Joined: Oct 2005
Status: Away
O.P. RE: More Website Help Please
Is there a way i can do this for links?
01-17-2007 03:21 PM
Profile PM Web Find Quote Report
NanaFreak
Scripting Contest Winner
*****


Posts: 1476
Reputation: 53
32 / Male / Flag
Joined: Jul 2006
RE: More Website Help Please
fulu's code +

code:
<a href="./newpage.php?page=contact">Contact Page</a>


;)
01-17-2007 03:24 PM
Profile PM Find Quote Report
Eddie
Veteran Member
*****


Posts: 2078
Reputation: 30
33 / Male / Flag
Joined: Oct 2005
Status: Away
O.P. RE: More Website Help Please
So i put felus page into a php file, and then just use that code??
Will felus code work with various pages with just that one code?
01-17-2007 03:25 PM
Profile PM Web Find Quote Report
NanaFreak
Scripting Contest Winner
*****


Posts: 1476
Reputation: 53
32 / Male / Flag
Joined: Jul 2006
RE: More Website Help Please
ok well i will give you a more advanced one this time

index.php:
code:
<a href="./newpage.php?page=contact">Contact Page</a>

newpage.php:
code:
<?php
$page = $_GET["page"];
?>
<html>
<?php
switch($page){
    case "contact":
        echo "Contact Page";
    break;
    case "other":
        echo "Other Page";
    break;
    default:
        echo "Couldnt find page!";
    break;
}
?>
</html>

click the link in index.php and the browser will then show:

Contact Page

... i hope this helps you out ...

This post was edited on 01-17-2007 at 03:31 PM by NanaFreak.
01-17-2007 03:30 PM
Profile PM Find Quote Report
Eddie
Veteran Member
*****


Posts: 2078
Reputation: 30
33 / Male / Flag
Joined: Oct 2005
Status: Away
O.P. RE: More Website Help Please
Ok great that works on the site, but im sorry :( How do i get it so it shows the page :S because with the code i cant get the page to come up.

EDIT: I also have a main content area that i want it to load in, and adjust the size of that depending on the size of the "page". Because if you see http://www.haboz.net/v6/ i currently have it running on JavaScript with page changing, but i need it how im asking.

EDIT 2: Unless i can leave it like that, and just have the "News" page using that method, which is the only reason i need it really *-)

This post was edited on 01-17-2007 at 03:56 PM by Eddie.
01-17-2007 03:41 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On