Single page website | via URL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
wulfgarpro
Forum Newbie
Posts: 1
Joined: Sun Nov 22, 2009 7:20 pm
Location: Melbourne, Australia

Single page website | via URL

Post by wulfgarpro »

Hi,

Im very new to PHP. Trying to divy up a simple 1 page website structure.

So far I have the following:

Code: Select all

<html>
<head><title>MDI Assets</title></head>
<body>
 
<?php
 
if(isset($_GET['enter'])) {
        echo "Page 1";
}
else if (isset($_GET['list'])) {
        echo "Page 2";
}
 
</body>
</html>
 
I understand this. Now how do I setup the links to open the associated pages (enter.php, list.php) ?

Thanks!

wulfgarpro.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Single page website | via URL

Post by requinix »

Hint: if the URL has ?var=value then $_GET["var"] == "value"...
User avatar
Apollo
Forum Regular
Posts: 794
Joined: Wed Apr 30, 2008 2:34 am

Re: Single page website | via URL

Post by Apollo »

wulfgarpro wrote:Now how do I setup the links to open the associated pages (enter.php, list.php) ?
Did you mean to do this?

Code: Select all

require_once("enter.php");
Post Reply