Page 1 of 1

Single page website | via URL

Posted: Sun Nov 22, 2009 7:49 pm
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.

Re: Single page website | via URL

Posted: Sun Nov 22, 2009 8:01 pm
by requinix
Hint: if the URL has ?var=value then $_GET["var"] == "value"...

Re: Single page website | via URL

Posted: Mon Nov 23, 2009 2:28 am
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");