From 39b4468beddff5bd798e73b51a160e56c0bdac44 Mon Sep 17 00:00:00 2001 From: Nitish1905373 <84439363+Nitish1905373@users.noreply.github.com> Date: Wed, 19 May 2021 16:57:20 +0530 Subject: [PATCH] 1905373_practical7.html --- Section B/1905373_practical7.html | 101 ++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 Section B/1905373_practical7.html diff --git a/Section B/1905373_practical7.html b/Section B/1905373_practical7.html new file mode 100644 index 0000000..77b14f5 --- /dev/null +++ b/Section B/1905373_practical7.html @@ -0,0 +1,101 @@ +// create an array with data for title, and meta, for each page +$pgdata = array(); +$pgdata['index'] = array( + 'title'=>'Title for Home page', + 'description'=>'Here add the description for Home page', + 'keywords'=>'meta keywords, for, home page' +); +$pgdata['about_me'] = array( + 'title'=>'Title for About Me page', + 'description'=>'Description for About Me, https://coursesweb.net', + 'keywords'=>'about me, https://coursesweb.net' +); +$pgdata['images'] = array( + 'title'=>'Title for Images', + 'description'=>'Here add the description for the page with images', + 'keywords'=>'images, pictures, photo' +); + +// set the page name +$pgname = isset($_GET['pg']) ? trim(strip_tags($_GET['pg'])) : 'index'; + +// get title, and meta data for current /accessed page +$title = $pgdata[$pgname]['title']; +$description = $pgdata[$pgname]['description']; +$keywords = $pgdata[$pgname]['keywords']; + +// set header for utf-8 encode +header('Content-type: text/html; charset=utf-8'); +?> + + + + + <?php echo $title; ?> + + + + + + + + + +
+ +
+
+ + + + +