{"id":18229,"date":"2022-10-30T02:57:37","date_gmt":"2022-10-29T21:27:37","guid":{"rendered":"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-dynamic-profile-page-closed\/"},"modified":"2022-10-30T02:57:37","modified_gmt":"2022-10-29T21:27:37","slug":"solved-how-to-make-a-dynamic-profile-page-closed","status":"publish","type":"post","link":"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-dynamic-profile-page-closed\/","title":{"rendered":"[Solved] HOW TO MAKE A DYNAMIC PROFILE PAGE? [closed]"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div id=\"answer-23575750\" class=\"answer js-answer accepted-answer js-accepted-answer\" data-answerid=\"23575750\" data-parentid=\"23575362\" data-score=\"2\" data-position-on-page=\"1\" data-highest-scored=\"1\" data-question-has-accepted-highest-score=\"1\" itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n<div class=\"post-layout\">\n<div class=\"votecell post-layout--left\"><\/div>\n<div class=\"answercell post-layout--right\">\n<div class=\"s-prose js-post-body\" itemprop=\"text\">\n<p>Well, for such small tasks no CMS (I mean WP or Drupal) is necessarily needed &#8211; customizing one for your needs will me much more painful, than adding a few PHP lines to your HTML files.<\/p>\n<p>To make your website able to get data, you will have to make it perform some server-side operations. This is most often done by PHP scripts (of which you could have heard of). If you are familiar with it, you can just skip the next paragraph.<\/p>\n<p>PHP is a really easy and powerful language to learn, but bear in mind that if you learn some bad practices at the very beginning, you will be having a bad time trying to get rid of them later. But for this single purpose, you should take look at PHP tutorial at Codecademy (well, SO does not allow me to post more than 2 links so far, so you will have to google it by yourself :(). By the way, there are lots of tutorials on Youtube for  guys just like you &#8211; just type in something like &#8220;php cms tutorial&#8221; and they will show up &#8211; but they might be at least a little confusing for people, who have never experienced PHP before.<\/p>\n<p>First of all, determine which part of your website will be affected by variables. In these places you will have to put PHP&#8217;s echoes, such as<\/p>\n<pre><code>&lt;?php echo $name ?&gt;\n\n&lt;?php echo $description ?&gt;\n<\/code><\/pre>\n<p>or, in case of an image:<\/p>\n<pre><code>&lt;img alt=\"some alt text\" src=\"https:\/\/stackoverflow.com\/questions\/23575362\/&lt;?php echo $image_location ?&gt;\"&gt;\n<\/code><\/pre>\n<p>If you have it, your next step will be writing a PHP code, that will perform:<\/p>\n<ol>\n<li>Reading from a data source (text file, database)<\/li>\n<li>Assigning each data part to a specific variable<\/li>\n<li><code>echo<\/code> ing it in the HTML file<\/li>\n<\/ol>\n<p>Sound pretty easy. So you have an image, a title, and a description. Well, title and a description may be kept in a single text file. The content inside will be separated by <code>explode()<\/code> function, for example if you keep your data in the <code>x.txt<\/code> file, that you will read in to a variable by the <code>file_get_contents()<\/code> function:<\/p>\n<p><code>Name|||Bio<\/code><\/p>\n<p>the <code>explode(\"|||\", $data)<\/code> function will return an array:<\/p>\n<p><code>[0] =&gt; \"Name\"<\/code><br \/>\n<code>[1] =&gt; \"Bio\"<\/code><\/p>\n<p>Well, of course this is not the most elegant way, but definitely the easiest. Anyway, it covers the reading part.<\/p>\n<p>For the writing part, that will be mostly used by your client, you should make a set of HTML files containing forms, that will forward to a PHP script executing validating, escaping and writing instructions. Get familar with superglobal array <code>$_POST<\/code>, functions such as <code>htmlspecialchars()<\/code>, <code>nl2br()<\/code>, <code>fwrite()<\/code>. You would also like to set a some kind of an <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/www.php.net\/manual\/en\/features.http-auth.php\">authentication<\/a>. For image upload, just check out <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/www.w3schools.com\/php\/php_file_upload.asp\">file upload tutorial<\/a>. Having your files location, you can store it in your files, and then put it in the <code>src<\/code> attribute of your <code>img<\/code> tag.<\/p>\n<\/p><\/div>\n<div class=\"mt24\"><\/div>\n<\/div>\n<p>            <span class=\"d-none\" itemprop=\"commentCount\">2<\/span> <\/p><\/div>\n<\/div>\n<p>[ad_2]<\/p>\n<p>solved HOW TO MAKE A DYNAMIC PROFILE PAGE? [closed] <\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] Well, for such small tasks no CMS (I mean WP or Drupal) is necessarily needed &#8211; customizing one for your needs will me much more painful, than adding a few PHP lines to your HTML files. To make your website able to get data, you will have to make it perform some server-side operations. &#8230; <a title=\"[Solved] HOW TO MAKE A DYNAMIC PROFILE PAGE? [closed]\" class=\"read-more\" href=\"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-dynamic-profile-page-closed\/\" aria-label=\"More on [Solved] HOW TO MAKE A DYNAMIC PROFILE PAGE? [closed]\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[320],"tags":[1858,346,597],"class_list":["post-18229","post","type-post","status-publish","format-standard","hentry","category-solved","tag-content-management-system","tag-html","tag-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[Solved] HOW TO MAKE A DYNAMIC PROFILE PAGE? [closed] - JassWeb<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-dynamic-profile-page-closed\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Solved] HOW TO MAKE A DYNAMIC PROFILE PAGE? [closed] - JassWeb\" \/>\n<meta property=\"og:description\" content=\"[ad_1] Well, for such small tasks no CMS (I mean WP or Drupal) is necessarily needed &#8211; customizing one for your needs will me much more painful, than adding a few PHP lines to your HTML files. To make your website able to get data, you will have to make it perform some server-side operations. ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-dynamic-profile-page-closed\/\" \/>\n<meta property=\"og:site_name\" content=\"JassWeb\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-29T21:27:37+00:00\" \/>\n<meta name=\"author\" content=\"Kirat\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kirat\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-dynamic-profile-page-closed\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-dynamic-profile-page-closed\/\"},\"author\":{\"name\":\"Kirat\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\"},\"headline\":\"[Solved] HOW TO MAKE A DYNAMIC PROFILE PAGE? [closed]\",\"datePublished\":\"2022-10-29T21:27:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-dynamic-profile-page-closed\/\"},\"wordCount\":461,\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"keywords\":[\"content-management-system\",\"html\",\"wordpress\"],\"articleSection\":[\"Solved\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-dynamic-profile-page-closed\/\",\"url\":\"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-dynamic-profile-page-closed\/\",\"name\":\"[Solved] HOW TO MAKE A DYNAMIC PROFILE PAGE? [closed] - JassWeb\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#website\"},\"datePublished\":\"2022-10-29T21:27:37+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-dynamic-profile-page-closed\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-dynamic-profile-page-closed\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-dynamic-profile-page-closed\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/jassweb.com\/solved\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[Solved] HOW TO MAKE A DYNAMIC PROFILE PAGE? [closed]\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/jassweb.com\/solved\/#website\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"name\":\"JassWeb\",\"description\":\"Build High-quality Websites\",\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/jassweb.com\/solved\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\",\"name\":\"Jass Web\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"contentUrl\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"width\":693,\"height\":132,\"caption\":\"Jass Web\"},\"image\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\",\"name\":\"Kirat\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750\",\"contentUrl\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750\",\"caption\":\"Kirat\"},\"sameAs\":[\"http:\/\/jassweb.com\"],\"url\":\"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[Solved] HOW TO MAKE A DYNAMIC PROFILE PAGE? [closed] - JassWeb","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:\/\/jassweb.com\/solved\/solved-how-to-make-a-dynamic-profile-page-closed\/","og_locale":"en_US","og_type":"article","og_title":"[Solved] HOW TO MAKE A DYNAMIC PROFILE PAGE? [closed] - JassWeb","og_description":"[ad_1] Well, for such small tasks no CMS (I mean WP or Drupal) is necessarily needed &#8211; customizing one for your needs will me much more painful, than adding a few PHP lines to your HTML files. To make your website able to get data, you will have to make it perform some server-side operations. ... Read more","og_url":"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-dynamic-profile-page-closed\/","og_site_name":"JassWeb","article_published_time":"2022-10-29T21:27:37+00:00","author":"Kirat","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kirat","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-dynamic-profile-page-closed\/#article","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-dynamic-profile-page-closed\/"},"author":{"name":"Kirat","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31"},"headline":"[Solved] HOW TO MAKE A DYNAMIC PROFILE PAGE? [closed]","datePublished":"2022-10-29T21:27:37+00:00","mainEntityOfPage":{"@id":"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-dynamic-profile-page-closed\/"},"wordCount":461,"publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"keywords":["content-management-system","html","wordpress"],"articleSection":["Solved"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-dynamic-profile-page-closed\/","url":"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-dynamic-profile-page-closed\/","name":"[Solved] HOW TO MAKE A DYNAMIC PROFILE PAGE? [closed] - JassWeb","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/#website"},"datePublished":"2022-10-29T21:27:37+00:00","breadcrumb":{"@id":"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-dynamic-profile-page-closed\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jassweb.com\/solved\/solved-how-to-make-a-dynamic-profile-page-closed\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-dynamic-profile-page-closed\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jassweb.com\/solved\/"},{"@type":"ListItem","position":2,"name":"[Solved] HOW TO MAKE A DYNAMIC PROFILE PAGE? [closed]"}]},{"@type":"WebSite","@id":"https:\/\/jassweb.com\/solved\/#website","url":"https:\/\/jassweb.com\/solved\/","name":"JassWeb","description":"Build High-quality Websites","publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jassweb.com\/solved\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/jassweb.com\/solved\/#organization","name":"Jass Web","url":"https:\/\/jassweb.com\/solved\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/","url":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","contentUrl":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","width":693,"height":132,"caption":"Jass Web"},"image":{"@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31","name":"Kirat","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/","url":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750","contentUrl":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750","caption":"Kirat"},"sameAs":["http:\/\/jassweb.com"],"url":"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/"}]}},"_links":{"self":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/18229","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/comments?post=18229"}],"version-history":[{"count":0,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/18229\/revisions"}],"wp:attachment":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/media?parent=18229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/categories?post=18229"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/tags?post=18229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}