{"id":67,"date":"2020-12-11T14:20:14","date_gmt":"2020-12-11T14:20:14","guid":{"rendered":"https:\/\/www.kindsonthegenius.com\/php\/?p=67"},"modified":"2026-10-29T01:28:28","modified_gmt":"2026-10-29T01:28:28","slug":"php-working-with-web","status":"publish","type":"post","link":"https:\/\/kindsonthegenius.com\/php\/php-working-with-web\/","title":{"rendered":"PHP &#8211; Working With Web"},"content":{"rendered":"<p>In this tutorial, we would begin to see how you can use PHP to create dynamic content for the web.<\/p>\n<ol>\n<li><a href=\"#t1\">Identifying User Platform<\/a><\/li>\n<li><a href=\"#t2\">Display Images on Web Page<\/a><\/li>\n<li><a href=\"#t3\">Working With HTML Forms<\/a><\/li>\n<li><a href=\"#t4\">Redirecting the Browser<\/a><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t1\">1. Identifying User Browser and Platform<\/strong><\/h4>\n<p>Most information about the PHP environment are available as environment variables. All these can be seen in the <em>phpinfo()<\/em> page. One important environment variable is the HTTP_USER_AGENT which identifies the user&#8217;s browser as well as the user OS.<\/p>\n<p>Also, there is a function called <em>getenv()<\/em> provided to access the value of the environment variables. The information contained in the HTTP_USER_AGENT can be read at runtime and used to output dynamic content to the user.<\/p>\n<p>The code below shows how to retrieve the user&#8217;s computer using the environment variables. The function getPlatform() does the work.<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #557799;\">&lt;?php<\/span>\r\n    <span style=\"color: #008800; font-weight: bold;\">function<\/span> <span style=\"color: #0066bb; font-weight: bold;\">getPlatform<\/span>(){\r\n        <span style=\"color: #996633;\">$user_agent<\/span> <span style=\"color: #333333;\">=<\/span> <span style=\"color: #996633;\">$_SERVER<\/span>[<span style=\"background-color: #fff0f0;\">\"HTTP_USER_AGENT\"<\/span>];\r\n        <span style=\"color: #996633;\">$platform<\/span> <span style=\"color: #333333;\">=<\/span> <span style=\"background-color: #fff0f0;\">\"Unknown\"<\/span>;\r\n\r\n        <span style=\"color: #888888;\">\/\/Get the browser platform<\/span>\r\n        <span style=\"color: #008800; font-weight: bold;\">if<\/span>(<span style=\"color: #007020;\">preg_match<\/span>(<span style=\"background-color: #fff0f0;\">\"\/windows|win32\/i\"<\/span>, <span style=\"color: #996633;\">$user_agent<\/span>)){\r\n            <span style=\"color: #996633;\">$platform<\/span> <span style=\"color: #333333;\">=<\/span> <span style=\"background-color: #fff0f0;\">\"Windows\"<\/span>;\r\n        }\r\n        <span style=\"color: #008800; font-weight: bold;\">elseif<\/span>(<span style=\"color: #007020;\">preg_match<\/span>(<span style=\"background-color: #fff0f0;\">\"\/linux\/i\"<\/span>, <span style=\"color: #996633;\">$user_agent<\/span>)){\r\n            <span style=\"color: #996633;\">$platform<\/span> <span style=\"color: #333333;\">=<\/span> <span style=\"background-color: #fff0f0;\">\"Linux\"<\/span>;\r\n        }\r\n        <span style=\"color: #008800; font-weight: bold;\">elseif<\/span>(<span style=\"color: #007020;\">preg_match<\/span>(<span style=\"background-color: #fff0f0;\">\"\/macintosh|mac os x\/i\"<\/span>, <span style=\"color: #996633;\">$user_agent<\/span>)){\r\n            <span style=\"color: #996633;\">$platform<\/span> <span style=\"color: #333333;\">=<\/span> <span style=\"background-color: #fff0f0;\">\"Mac\"<\/span>;\r\n        }\r\n        <span style=\"color: #008800; font-weight: bold;\">echo<\/span> <span style=\"background-color: #fff0f0;\">\"You are using a \"<\/span> <span style=\"color: #333333;\">.<\/span> <span style=\"color: #996633;\">$platform<\/span> <span style=\"color: #333333;\">.<\/span> <span style=\"background-color: #fff0f0;\">\" computer\"<\/span>;\r\n    }\r\n    getPlatform(); <span style=\"color: #888888;\">\/\/Call the function<\/span>\r\n<span style=\"color: #557799;\">?&gt;<\/span>   \r\n<\/pre>\n<p>On my pc, the code output the following text: &#8220;<em>You are using a Mac computer<\/em>&#8220;. For you it may be different depending on your pc.<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t2\">2. A Program to Display Images<\/strong><\/h4>\n<p>We would not write a program to display images on the browser. There a three functions you will learn here:<\/p>\n<p><strong>rand()<\/strong> &#8211; this function is used to generate random numbers. We would use it to generate random numbers within a given range<\/p>\n<p><strong>srand()<\/strong> &#8211; if you want to avoid getting the same pattern of random numbers, then <em>srand()<\/em> is better. So you then specify a seed.<\/p>\n<p><strong>microtime()<\/strong> &#8211; this is an inbuilt function used to return the current timestamp in microseconds<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #557799;\">&lt;?php<\/span>\r\n    srand(<span style=\"color: #007020;\">microtime<\/span>() <span style=\"color: #333333;\">*<\/span> <span style=\"color: #0000dd; font-weight: bold;\">1000000<\/span>);\r\n    <span style=\"color: #996633;\">$val<\/span> <span style=\"color: #333333;\">=<\/span> rand(<span style=\"color: #0000dd; font-weight: bold;\">1<\/span>, <span style=\"color: #0000dd; font-weight: bold;\">4<\/span>);\r\n\r\n    <span style=\"color: #008800; font-weight: bold;\">switch<\/span>(<span style=\"color: #996633;\">$val<\/span>) {\r\n        <span style=\"color: #008800; font-weight: bold;\">case<\/span> <span style=\"color: #0000dd; font-weight: bold;\">1<\/span><span style=\"color: #333333;\">:<\/span> <span style=\"color: #996633;\">$image_path<\/span> <span style=\"color: #333333;\">=<\/span> <span style=\"background-color: #fff0f0;\">\"\/images\/squirrel.jpg\"<\/span>;\r\n    <span style=\"color: #008800; font-weight: bold;\">break<\/span>;\r\n        <span style=\"color: #008800; font-weight: bold;\">case<\/span> <span style=\"color: #0000dd; font-weight: bold;\">2<\/span><span style=\"color: #333333;\">:<\/span> <span style=\"color: #996633;\">$image_path<\/span> <span style=\"color: #333333;\">=<\/span> <span style=\"background-color: #fff0f0;\">\"\/images\/dog.jpg\"<\/span>;\r\n    <span style=\"color: #008800; font-weight: bold;\">break<\/span>;\r\n        <span style=\"color: #008800; font-weight: bold;\">case<\/span> <span style=\"color: #0000dd; font-weight: bold;\">3<\/span><span style=\"color: #333333;\">:<\/span> <span style=\"color: #996633;\">$image_path<\/span> <span style=\"color: #333333;\">=<\/span> <span style=\"background-color: #fff0f0;\">\"\/images\/lion.jpg\"<\/span>;\r\n    <span style=\"color: #008800; font-weight: bold;\">break<\/span>;\r\n        <span style=\"color: #008800; font-weight: bold;\">case<\/span> <span style=\"color: #0000dd; font-weight: bold;\">4<\/span><span style=\"color: #333333;\">:<\/span> <span style=\"color: #996633;\">$image_path<\/span> <span style=\"color: #333333;\">=<\/span> <span style=\"background-color: #fff0f0;\">\"\/images\/horse.jpg\"<\/span>;\r\n    <span style=\"color: #008800; font-weight: bold;\">break<\/span>;\r\n    }\r\n    <span style=\"color: #008800; font-weight: bold;\">echo<\/span> <span style=\"background-color: #fff0f0;\">\"Current Image is: &lt;img src=<\/span><span style=\"background-color: #eeeeee;\">$image_path<\/span><span style=\"background-color: #fff0f0;\"> \/&gt;\"<\/span>;\r\n<span style=\"color: #557799;\">?&gt;<\/span> \r\n<\/pre>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t3\">3. Working With HTML Forms<\/strong><\/h4>\n<p>Let&#8217;s now see how we can create a form submission using PHP. Normally, form elements are placed in HTML pages. These form elements are available to the PHP script as well. An example is given below<br \/>\n<!-- HTML generated using hilite.me --><\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #557799;\">&lt;?php<\/span>\r\n    <span style=\"color: #008800; font-weight: bold;\">if<\/span>(<span style=\"color: #996633;\">$_POST<\/span>[<span style=\"background-color: #fff0f0;\">\"name\"<\/span>] <span style=\"color: #333333;\">||<\/span> <span style=\"color: #996633;\">$_POST<\/span>[<span style=\"background-color: #fff0f0;\">\"score\"<\/span>]){\r\n        <span style=\"color: #008800; font-weight: bold;\">if<\/span>(<span style=\"color: #007020;\">preg_match<\/span>(<span style=\"background-color: #fff0f0;\">\"\/^A-Za-z'-]\/\"<\/span>, <span style=\"color: #996633;\">$_POST<\/span>[<span style=\"background-color: #fff0f0;\">'name'<\/span>])) {\r\n            <span style=\"color: #008800; font-weight: bold;\">exit<\/span>(<span style=\"background-color: #fff0f0;\">\"The name you entered is not valid!\"<\/span>);\r\n        }\r\n        <span style=\"color: #008800; font-weight: bold;\">echo<\/span> <span style=\"background-color: #fff0f0;\">\"Hello \"<\/span><span style=\"color: #333333;\">.<\/span><span style=\"color: #996633;\">$_POST<\/span>[<span style=\"background-color: #fff0f0;\">'name'<\/span>]<span style=\"color: #333333;\">.<\/span> <span style=\"background-color: #fff0f0;\">\"&lt;br&gt;\"<\/span>;\r\n        <span style=\"color: #008800; font-weight: bold;\">echo<\/span> <span style=\"background-color: #fff0f0;\">\"You scored \"<\/span><span style=\"color: #333333;\">.<\/span> <span style=\"color: #996633;\">$_POST<\/span>[<span style=\"background-color: #fff0f0;\">'score'<\/span>]<span style=\"color: #333333;\">.<\/span> <span style=\"background-color: #fff0f0;\">\"&lt;br&gt;\"<\/span>;\r\n        <span style=\"color: #008800; font-weight: bold;\">exit<\/span>();\r\n    }\r\n<span style=\"color: #557799;\">?&gt;<\/span>     \r\n<span style=\"color: #007700;\">&lt;html&gt;<\/span>\r\n    <span style=\"color: #007700;\">&lt;body&gt;<\/span>\r\n        <span style=\"color: #007700;\">&lt;form<\/span> <span style=\"color: #0000cc;\">action=<\/span><span style=\"background-color: #fff0f0;\">\"<\/span><span style=\"color: #557799;\">&lt;?php<\/span> <span style=\"color: #996633;\">$PHP_SELF<\/span> <span style=\"color: #557799;\">?&gt;<\/span><span style=\"background-color: #fff0f0;\">\"<\/span> <span style=\"color: #0000cc;\">method =<\/span> <span style=\"background-color: #fff0f0;\">\"POST\"<\/span><span style=\"color: #007700;\">&gt;<\/span>\r\n        Name: <span style=\"color: #007700;\">&lt;input<\/span> <span style=\"color: #0000cc;\">type=<\/span><span style=\"background-color: #fff0f0;\">\"text\"<\/span> <span style=\"color: #0000cc;\">name=<\/span><span style=\"background-color: #fff0f0;\">\"name\"<\/span> <span style=\"color: #007700;\">\/&gt;<\/span>\r\n        <span style=\"color: #007700;\">&lt;br&gt;<\/span>\r\n        Age: <span style=\"color: #007700;\">&lt;input<\/span> <span style=\"color: #0000cc;\">type=<\/span><span style=\"background-color: #fff0f0;\">\"text\"<\/span> <span style=\"color: #0000cc;\">name=<\/span><span style=\"background-color: #fff0f0;\">\"score\"<\/span> <span style=\"color: #007700;\">\/&gt;<\/span>\r\n        <span style=\"color: #007700;\">&lt;input<\/span> <span style=\"color: #0000cc;\">type=<\/span><span style=\"background-color: #fff0f0;\">\"submit\"<\/span><span style=\"color: #007700;\">\/&gt;<\/span>\r\n        <span style=\"color: #007700;\">&lt;\/form&gt;<\/span>\r\n    <span style=\"color: #007700;\">&lt;\/body&gt;<\/span>\r\n<span style=\"color: #007700;\">&lt;\/html&gt;<\/span>\r\n<\/pre>\n<p>A little bit of explanation of the code above is provided here:<\/p>\n<ul>\n<li>the variable $_PHP_SELF is a PHP default variable and it means the the form is submitted to the same page<\/li>\n<li>the POST method is used to transfer the content of the form to the PHP script for processing<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t4\">4. Redirecting the Browser<\/strong><\/h4>\n<p>PHP provides a function called header() which is used to redirect the browser to another location while providing header attributes in raw format. The script for redirection should be placed at the top of the script. In this way, the page would be redirected before loading the current page.<\/p>\n<p>The target location is specified as an argument to the header() function After call this function, the exit() function can then be used to prevent executing the rest of the code.<\/p>\n<p>The example below shows how you can redirect the browser to another page. I recommend you try it out yourself to see how it works.<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #557799;\">&lt;?php<\/span>\r\n    <span style=\"color: #008800; font-weight: bold;\">if<\/span> (<span style=\"color: #996633;\">$_POST<\/span>[<span style=\"background-color: #fff0f0;\">\"location\"<\/span>]) {\r\n        <span style=\"color: #996633;\">$location<\/span> <span style=\"color: #333333;\">=<\/span> <span style=\"color: #996633;\">$_POST<\/span>[<span style=\"background-color: #fff0f0;\">\"location\"<\/span>]; <span style=\"color: #888888;\">\/\/get location value from form<\/span>\r\n        header(<span style=\"background-color: #fff0f0;\">\"Location:<\/span><span style=\"background-color: #eeeeee;\">$location<\/span><span style=\"background-color: #fff0f0;\">\"<\/span>);\r\n        <span style=\"color: #008800; font-weight: bold;\">exit<\/span>();\r\n    }\r\n<span style=\"color: #557799;\">?&gt;<\/span>     \r\n<span style=\"color: #007700;\">&lt;html&gt;<\/span>\r\n    <span style=\"color: #007700;\">&lt;body&gt;<\/span>\r\n        Select from the list of pages: <span style=\"color: #007700;\">&lt;br&gt;<\/span>\r\n        <span style=\"color: #007700;\">&lt;form<\/span> <span style=\"color: #0000cc;\">action=<\/span><span style=\"background-color: #fff0f0;\">\"<\/span><span style=\"color: #557799;\">&lt;?php<\/span> <span style=\"color: #996633;\">$_SERVER<\/span>[<span style=\"background-color: #fff0f0;\">'PHP_SELF'<\/span>] <span style=\"color: #557799;\">?&gt;<\/span><span style=\"background-color: #fff0f0;\">\"<\/span> <span style=\"color: #0000cc;\">method =<\/span> <span style=\"background-color: #fff0f0;\">\"POST\"<\/span><span style=\"color: #007700;\">&gt;<\/span>\r\n            <span style=\"color: #007700;\">&lt;select<\/span> <span style=\"color: #0000cc;\">name=<\/span><span style=\"background-color: #fff0f0;\">\"location\"<\/span><span style=\"color: #007700;\">&gt;<\/span>.\r\n\r\n                <span style=\"color: #007700;\">&lt;option<\/span> <span style=\"color: #0000cc;\">value=<\/span><span style=\"background-color: #fff0f0;\">\"https:\/\/www.kindsonthegenius.com\"<\/span><span style=\"color: #007700;\">&gt;<\/span>\r\n                    kinsonthegenius.com\r\n                <span style=\"color: #007700;\">&lt;\/option&gt;<\/span>\r\n\r\n                <span style=\"color: #007700;\">&lt;option<\/span> <span style=\"color: #0000cc;\">value=<\/span><span style=\"background-color: #fff0f0;\">\"http:\/\/www.datarmatics.com\"<\/span><span style=\"color: #007700;\">&gt;<\/span>\r\n                    Datarmatics site\r\n                <span style=\"color: #007700;\">&lt;\/option&gt;<\/span>\r\n            <span style=\"color: #007700;\">&lt;\/select&gt;<\/span>\r\n            <span style=\"color: #007700;\">&lt;input<\/span> <span style=\"color: #0000cc;\">type=<\/span><span style=\"background-color: #fff0f0;\">\"submit\"<\/span> <span style=\"color: #007700;\">\/&gt;<\/span>\r\n        <span style=\"color: #007700;\">&lt;\/form&gt;<\/span>\r\n    <span style=\"color: #007700;\">&lt;\/body&gt;<\/span>\r\n<span style=\"color: #007700;\">&lt;\/html&gt;<\/span>\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we would begin to see how you can use PHP to create dynamic content for the web. Identifying User Platform Display Images &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[1],"tags":[6],"class_list":["post-67","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-working-with-html"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PHP - Working With Web | Kindson The Genius<\/title>\n<meta name=\"description\" content=\"PHP - Working With Web \u2014 free PHP tutorial by Kindson Munonye with clear examples. Step-by-step for beginners. Part of Kindson The Genius. Free online.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kindsonthegenius.com\/php\/php-working-with-web\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP - Working With Web | Kindson The Genius\" \/>\n<meta property=\"og:description\" content=\"PHP - Working With Web \u2014 free PHP tutorial by Kindson Munonye with clear examples. Step-by-step for beginners. Part of Kindson The Genius. Free online.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kindsonthegenius.com\/php\/php-working-with-web\/\" \/>\n<meta property=\"og:site_name\" content=\"PHP Tutorial\" \/>\n<meta property=\"article:published_time\" content=\"2020-12-11T14:20:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-29T01:28:28+00:00\" \/>\n<meta name=\"author\" content=\"kindsonthegenius\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"kindsonthegenius\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/php\\\/php-working-with-web\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/php\\\/php-working-with-web\\\/\"},\"author\":{\"name\":\"kindsonthegenius\",\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/php\\\/#\\\/schema\\\/person\\\/a2dcea4c76668e90e5842583fd5a5f60\"},\"headline\":\"PHP &#8211; Working With Web\",\"datePublished\":\"2020-12-11T14:20:14+00:00\",\"dateModified\":\"2026-10-29T01:28:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/php\\\/php-working-with-web\\\/\"},\"wordCount\":461,\"keywords\":[\"Working With HTML\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/php\\\/php-working-with-web\\\/\",\"url\":\"https:\\\/\\\/kindsonthegenius.com\\\/php\\\/php-working-with-web\\\/\",\"name\":\"PHP - Working With Web | Kindson The Genius\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/php\\\/#website\"},\"datePublished\":\"2020-12-11T14:20:14+00:00\",\"dateModified\":\"2026-10-29T01:28:28+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/php\\\/#\\\/schema\\\/person\\\/a2dcea4c76668e90e5842583fd5a5f60\"},\"description\":\"PHP - Working With Web \u2014 free PHP tutorial by Kindson Munonye with clear examples. Step-by-step for beginners. Part of Kindson The Genius. Free online.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/php\\\/php-working-with-web\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/kindsonthegenius.com\\\/php\\\/php-working-with-web\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/php\\\/php-working-with-web\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/kindsonthegenius.com\\\/php\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP &#8211; Working With Web\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/php\\\/#website\",\"url\":\"https:\\\/\\\/kindsonthegenius.com\\\/php\\\/\",\"name\":\"PHP Tutorial\",\"description\":\"Beginner to Expert With Practicals\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/kindsonthegenius.com\\\/php\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/kindsonthegenius.com\\\/php\\\/#\\\/schema\\\/person\\\/a2dcea4c76668e90e5842583fd5a5f60\",\"name\":\"kindsonthegenius\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g\",\"caption\":\"kindsonthegenius\"},\"url\":\"https:\\\/\\\/kindsonthegenius.com\\\/php\\\/author\\\/kindsonthegenius-3\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP - Working With Web | Kindson The Genius","description":"PHP - Working With Web \u2014 free PHP tutorial by Kindson Munonye with clear examples. Step-by-step for beginners. Part of Kindson The Genius. Free online.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kindsonthegenius.com\/php\/php-working-with-web\/","og_locale":"en_US","og_type":"article","og_title":"PHP - Working With Web | Kindson The Genius","og_description":"PHP - Working With Web \u2014 free PHP tutorial by Kindson Munonye with clear examples. Step-by-step for beginners. Part of Kindson The Genius. Free online.","og_url":"https:\/\/kindsonthegenius.com\/php\/php-working-with-web\/","og_site_name":"PHP Tutorial","article_published_time":"2020-12-11T14:20:14+00:00","article_modified_time":"2026-10-29T01:28:28+00:00","author":"kindsonthegenius","twitter_card":"summary_large_image","twitter_misc":{"Written by":"kindsonthegenius","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kindsonthegenius.com\/php\/php-working-with-web\/#article","isPartOf":{"@id":"https:\/\/kindsonthegenius.com\/php\/php-working-with-web\/"},"author":{"name":"kindsonthegenius","@id":"https:\/\/kindsonthegenius.com\/php\/#\/schema\/person\/a2dcea4c76668e90e5842583fd5a5f60"},"headline":"PHP &#8211; Working With Web","datePublished":"2020-12-11T14:20:14+00:00","dateModified":"2026-10-29T01:28:28+00:00","mainEntityOfPage":{"@id":"https:\/\/kindsonthegenius.com\/php\/php-working-with-web\/"},"wordCount":461,"keywords":["Working With HTML"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/kindsonthegenius.com\/php\/php-working-with-web\/","url":"https:\/\/kindsonthegenius.com\/php\/php-working-with-web\/","name":"PHP - Working With Web | Kindson The Genius","isPartOf":{"@id":"https:\/\/kindsonthegenius.com\/php\/#website"},"datePublished":"2020-12-11T14:20:14+00:00","dateModified":"2026-10-29T01:28:28+00:00","author":{"@id":"https:\/\/kindsonthegenius.com\/php\/#\/schema\/person\/a2dcea4c76668e90e5842583fd5a5f60"},"description":"PHP - Working With Web \u2014 free PHP tutorial by Kindson Munonye with clear examples. Step-by-step for beginners. Part of Kindson The Genius. Free online.","breadcrumb":{"@id":"https:\/\/kindsonthegenius.com\/php\/php-working-with-web\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kindsonthegenius.com\/php\/php-working-with-web\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kindsonthegenius.com\/php\/php-working-with-web\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/kindsonthegenius.com\/php\/"},{"@type":"ListItem","position":2,"name":"PHP &#8211; Working With Web"}]},{"@type":"WebSite","@id":"https:\/\/kindsonthegenius.com\/php\/#website","url":"https:\/\/kindsonthegenius.com\/php\/","name":"PHP Tutorial","description":"Beginner to Expert With Practicals","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kindsonthegenius.com\/php\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/kindsonthegenius.com\/php\/#\/schema\/person\/a2dcea4c76668e90e5842583fd5a5f60","name":"kindsonthegenius","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g","caption":"kindsonthegenius"},"url":"https:\/\/kindsonthegenius.com\/php\/author\/kindsonthegenius-3\/"}]}},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/kindsonthegenius.com\/php\/wp-json\/wp\/v2\/posts\/67","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kindsonthegenius.com\/php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kindsonthegenius.com\/php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/php\/wp-json\/wp\/v2\/comments?post=67"}],"version-history":[{"count":2,"href":"https:\/\/kindsonthegenius.com\/php\/wp-json\/wp\/v2\/posts\/67\/revisions"}],"predecessor-version":[{"id":71,"href":"https:\/\/kindsonthegenius.com\/php\/wp-json\/wp\/v2\/posts\/67\/revisions\/71"}],"wp:attachment":[{"href":"https:\/\/kindsonthegenius.com\/php\/wp-json\/wp\/v2\/media?parent=67"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/php\/wp-json\/wp\/v2\/categories?post=67"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/php\/wp-json\/wp\/v2\/tags?post=67"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}