0% found this document useful (0 votes)
82 views

Lab 2.1 Create PHP Url Links

Uploaded by

phuong.la0120
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views

Lab 2.1 Create PHP Url Links

Uploaded by

phuong.la0120
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

LAB 2.

1 Create URLs with PHP


Assume that link to your website is: http://domain.com
Or locally http://localhost/

Assign links to buttons in Navigation bar (Horizontal Menu)

From previous layout, organize your buttons in horizontal navigation, such as:

Home Products Login Register

Assign links to above buttons as:


http://localhost/index.php?page=home (URL 1)

(default file: index.php)

Similarly,
http://localhost/ index.php?page=products (URL 2)
http://localhost/ index.php?page=login (URL 3)
http://localhost/ index.php?page=register (URL 4)

Make sure when you click on the links, some contents appear inside body section of
the web page interface.

When you click on URL 1, the browser loads home.php


Similar with URL 2 and URL 3, browser loads products.php and login.php

Note: You can include different files *.php inside the main interface, by using
include “filename.php”;

Expected outcome: you complete the files:


• index.php
• home.php
• login.php
• css + js files (if needed)

You might also like