Web Analytics Made Easy -
StatCounter Use PHP 2 format menu link when removing code to its own page & making it an include - CodingForum

Announcement

Collapse
No announcement yet.

Use PHP 2 format menu link when removing code to its own page & making it an include

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Use PHP 2 format menu link when removing code to its own page & making it an include

    I thought I would provide this for those who would like to, or have thought of removing the menu code and making it into an include php file without breaking the formatting of 'live' links, if they have code that makes them have formatting that is different from the other links when on that page.

    Lets say that your menu has 20 links (or pages) and at the moment each page has the menu code in it. Well, what would happen if one change were needed in the menu code, for example when you add a page link? You would have to go through all 20 (now 21) pages to change that menu code to reflect that change.

    To save time on this laborius work, one can remove the menu code and put it into its own page and then include that page with php as an include where that code originally sat. This way you only have to change ONE page instead of 20 (now 21).

    Here is an example:

    Original menu code on all pages:

    Code:
    <ul class="nav navbar-nav">
    <li class="current"><a href="index.php">HOME</a></li>
    <li><a href="about.php">ABOUT ME</a></li>
    <li><a href="HealingMinistries.php">HEALING MINISTRIES</a></li>
    <li><a href="services.php">SERVICES</a>
    <ul>
    <li><a href="criticaltesting.php">Crtical Testing</a></li>
    <li><a href="watertesting.php">Water Testing</a></li>
    </ul>
    </li>
    <li><a href="testimonials.php">TESTIMONIALS</a></li>
    <li><a href="vax-re-ed.php">VAX' RE-EDUCATION</a>
    <ul>
    <li><a href="1200-studies.php">Dr. Alan Palmer - 1,200 studies</a></li>
    <li><a href="childrensHDorg.php">Childrens Health Defense.org</a></li>
    <li><a href="corvela-it.php">Corvelva.it Vaccine Authority Italy</a></li>
    </ul>
    </li>
    <li><a href="physiciansRT.php">PHYSICIANS RT</a></li>
    <li><a href="holisticVM.php">HOLISTIC VET MEDICINE</a></li>
    <li><a href="self-help.php">SELF-HELP RESOURCES</a></li>
    <li><a href="real-global-news.php">REAL GLOBAL NEWS</a></li>
    <ul>
    <li><a href="rgn.php"> </a></li>
    <li><a href="js.php"> </a></li>
    <li><a href="naturalnews.php"> </a></li>
    <li><a href="other.php"> </a></li>
    </ul>
    <li><a href="contact.php">CONTACT</a></li>
    </ul>
    You can see that the special formatting for the current page link is shown as a class called current. Normally one would have to change that code for each page so that the same formatting would be appear in the link for that page as this one. Here is how to do this with the code being put into its own include page.

    Creat a new blank PHP page and call it, for example, top-menu.php. Copy the menu code and any divs into that page. Save it and upload it to the includes folder or the same folder where the original page sits (I put all my includes into an folder called includes - it makes it easier for me). For the purpose of this exampe I will use an includes folder to put the top-menu.php page into.

    Create a PHP variable to represent a live link which you place at the top of each page, for example:

    PHP Code:
    <?php
    $live
    ="current" ;
    ?>
    But since each page needs to have a unique indentifier make the variable numbered (the example shown is for my index page):

    PHP Code:
    <?php
    $live0
    ="current" ;
    ?>
    In the area where the menu code used to be add this PHP code to include the menu code that is now in its own page:

    PHP Code:
    <?php include('includes/top-menu.php'); ?>
    In your top-menu.php change the link code so that each link has a class like so:

    Code:
    <ul class="nav navbar-nav">
      <li class="<?php echo($live0); ?>"><a href="index.php">HOME</a></li>
      <li class="<?php echo($live1); ?>"><a href="about.php">ABOUT ME</a></li>
          <div class="dropdown"><!-- Added dropdown button menu item -->
            <button class="dropbtn <?php echo($live8); ?>">VACCINE RE-EDUCATION↵</button>
            <div class="dropdown-content">
            <a href="1200-studies.php">Dr. Alan Palmer - 1,200 studies</a>
            <a href="childrensHDorg.php">Childrens Health Defense.org</a>
            <a href="corvela-it.php">Corvelva.it - Vaccine Authority of Italy</a>
            </div>
          </div><!-- End dropdown button menu item -->
      <li class="<?php echo($live2); ?>"><a href="HealingMinistries.php">HEALING MINISTRIES</a></li>
          <div class="dropdown"><!-- Added dropdown button menu item -->
            <button class="dropbtn <?php echo($live9); ?>">SERVICES↵</button>
            <div class="dropdown-content">
            <a href="criticaltesting.php">Crtical Testing</a>
            <a href="watertesting.php">Water Testing</a>
           </div>
         </div><!-- End dropdown button menu item -->
    <li class="<?php echo($live3); ?>"><a href="testimonials.php">TESTIMONIALS</a></li>
          <div class="dropdown"><!-- Added dropdown button menu item -->
           <button class="dropbtn <?php echo($live10); ?>">REAL GLOBAL NEWS↵</button>
            <div class="dropdown-content">
            <a href="biomagscience.php">Biomag Science.net</a>
            <a href="enemywatch.php">Enemy Watch.org</a>
            <a href="exposeevil.php">Expose Evil.org</a>
            <a href="sonsofliberty.php">Sons of Liberty Media.com</a>
           <a href="speakprojectmedia.php">Speak Project Media.net</a>
           </div>
        </div><!-- End dropdown button menu item -->
    <li class="<?php echo($live4); ?>"><a href="self-help.php">SELF-HELP RESOURCES</a></li>
    <li class="<?php echo($live5); ?>"><a href="physiciansRT.php" title="Physician's Round Table">PHYSICIAN'S RT</a></li>
    <li class="<?php echo($live6); ?>"><a href="holisticVM.php" title="Holistic Veterinary Medicine">HOLISTIC VET MEDICINE</a></li>
    <li class="<?php echo($live7); ?>"><a href="contact.php">CONTACT</a></li>
    </ul>
    For each page one must put its corresponding PHP variable at the top of the page as laid out above. This way the formatting of the links will work and when you need to change the menu itself you have just one file to change. I hope that this has been clear as its not something I do normally, but thought I would pass this tip on.
    Last edited by judgedredd; Jul 11, 2020, 03:43 AM.

  • #2
    Some observations:

    1) If you're going to use PHP, use it so that it can do the heavy lifting for you. This means create some functions that you can just spit the current page's link name at so it handles the "current" class. Storing the data as 'name => uri' and 'name => Array of submenu pairs' would be easier to work with than markup laden with extra crap.

    2) Your PHP version is spitting out invalid markup on every one of your DIV. DIV is not a valid child of UL.

    3) I assume those buttons are for scripting? Don't do that... this is 2020, don't use JavaScript for dropdown menus.

    4) Echo all of it with a single <?php, instead of doing <?php echo 'blah'; ?> on every joe-blasted line.

    5) If you're going to use PHP for your menu, you might as well do a proper header and footer in PHP so that all like elements on every page are shared, not just the menu.

    6) If you need that many dropdowns and that many menu items, there's probably something wrong with the site in question. I've been ripping out larger menus like that for their being usability and accessibility junk that's more likely to piss off visitors than be helpful to them.

    7) Your semantics is also gibberish since you just blindly slopped anchors into a DIV, instead of creating a proper UL/LI structure as per your original markup.
    I'll kill you and your dreams tonight, begin new life.
    Bleed your death upon me, let your bloodline feed my youth.
    https://cutcodedown.com

    Comment


    • #3
      Hi deathshadow, First of all thanks for the time taken to read what I have written and then respond.

      I am not a professional coder and have not worked extensively with PHP. I am used to working with old html code (tables!) and find it harder to work with modern html coding. But I persist and learn.

      I am building the site that has the code in question here: http://matrixfiles.com/rc/test7/index.php

      It is a template I found that I am adapting. It did not have dropdown menus and, as you can see, it needs a few because of the number of links. If you want to see the site I am updating it is here: http://rachelceller.org

      So I needed a way to make the site work as closely as possible to the original design of the new template with the way the links change color, etc. I came up with the solution on my own without any extensive experience in PHP and felt bloody great that I had done so without looking for the solution on the 'net. The code works on all devices that it has been tested on and since error reporting is off, no one sees the errors that you talk about. You had them come up as you know how to look for them or had your environment configured to show these errors.

      As far as I am aware I have only used CSS for the formating of the buttons/links. I don't like using js (if I can avoid it I will) and try and find everything in PHP.

      I have used includes for the header, the addtoany code (social media follow buttons), the menu and the copyright footer.

      As to creating formulas that is beyond my skill at the moment and as it stands the coding was done once for the links and a couple of lines of code go at the top of each page. That was far easier for me to do than to delve into how to create formulas to do what you suggest.

      I am aware of PHPs ability to pull the name of the page from the address bar (or however it does it) but I am not sure how to create the formula(e) and then plug that code into the site without the site formatting being broken. What I did with the links was my first attemp and to all intents and purposes it worked.

      As to the gibberish you mention in point 7, I got the solution about dropping certain elements of the menu from another site and I used their css and anchor code. While searching for the dropdown solution I saw that menus could be created entirely with DIVs, but since the link code had specific formatting to do with the site I decided to leave that part alone (for now).

      Over the years I have always read coders saying to close one's php statments with the '?>' which is why I do it. As far as I am aware that is proper coding etiquette, though I am not sure what the rules are for this.

      In my view, coding has become much more difficult over the years with more and more complexity being added. I understand the underlying reasons why this is happening and do not like it at all. But that's a topic for another day. Thanks again for taking time out with your post.
      Last edited by judgedredd; Jul 13, 2020, 06:33 AM.

      Comment


      • #4
        Originally posted by judgedredd View Post
        I am not a professional coder and have not worked extensively with PHP. I am used to working with old html code (tables!) and find it harder to work with modern html coding. But I persist and learn.
        Good on you for the persistent. Web development is -- like all programming -- an ever-changing world. The day you stop learning is the day the world leaves you behind.

        Originally posted by judgedredd View Post
        I am building the site that has the code in question here
        In both cases (old site and template) on accessibility failings alone If someone brought that to me as a client, I'd tell them to junk it and start over. Fixed layout concepts, broken fixed metric fonts, images for text, gibberish markup that tells users with accessibility needs to go plow themselves... it's got problems.

        I really think you need to back up and learn more about HTML and CSS before you worry about PHP here... and I'm gonna get to why towards the bottom of this post.

        Originally posted by judgedredd View Post
        So I needed a way to make the site work as closely as possible to the original design of the new template with the way the links change color, etc.
        The LAST thing I'd suggest is to preserve any of that. Illegible colour contrasts, layout that no amount of coding is going to fix when it comes to accessible design, gibberish structure where it feels like someone was just pissing copypasta into a page with zero concern for content or usability... That's a painfully bad site. I mean it's no "world's worst website ever" but it's shocking close.

        Originally posted by judgedredd View Post
        As far as I am aware I have only used CSS for the formating of the buttons/links. I don't like using js (if I can avoid it I will) and try and find everything in PHP.
        The BUTTON tag is for submitting to forms, or if type="button" to be used as hooks for JavaScript. Without JavaScript those BUTTON serve no purpose and/or don't do anything.

        Originally posted by judgedredd View Post
        As to creating formulas that is beyond my skill at the moment and as it stands the coding was done once for the links and a couple of lines of code go at the top of each page. That was far easier for me to do than to delve into how to create formulas to do what you suggest.
        I don't think formula is the word you're looking for, the easiest approach is likely to use functions and comma delimited echo.

        Originally posted by judgedredd View Post
        As to the gibberish you mention in point 7, I got the solution about dropping certain elements of the menu from another site and I used their css and anchor code.
        This is a big problem right now in development, it's too easy to blindly copy code in, particularly if you don't understand the basics of HTML. You've created invalid markup by putting DIV where they just don't belong. It's also why your dropdowns on the actual page are broken/useless on mobile.

        Originally posted by judgedredd View Post
        Over the years I have always read coders saying to close one's php statments with the '?>' which is why I do it. As far as I am aware that is proper coding etiquette, though I am not sure what the rules are for this.
        It's not so much closing it (which is actually optional) as it is saying <?php more than once in a file. It actually leads to more code, harder to work with code, and convoluted practices.

        Originally posted by judgedredd View Post
        In my view, coding has become much more difficult over the years with more and more complexity being added.
        It actually hasn't, but if you learned in the "tables for layout" era you learned how to do things utterly and totally wrong, from people and at a time when pissing on the entire reason TBL even created HTML was the hot and trendy thing yo do.

        There's a... mental hurdle where you basically need to forget everything you think you know about HTML.

        That mental hurdle relates to what I said earlier about needing to learn HTML over again from the start, and it boils down to one simple point:

        HTML is for saying what things are, structurally, grammatically, and NOT what you want things to look like. If you are choosing any of your tags, classes, or ID's based on what you want things to look like, you're doing it ALL WRONG. That's what was so broken about 1990's style HTML 3.2 and the idiotic 4 tranny that people used after it.

        H1..H6 do not mean "fonts in different weights and sizes". An H1 (singular) MEANS (if not using the new SECTION tag) the heading Singular under which all content on a page is a subsection, which is why it should be your FIRST "content-bearing" element inside BODY. Think of it like how the title of a newspaper or book is on every fold-pair. An H2 marks the start of a major subsection of the page, with the first H2 marking the start of the main content of the page (unless the new MAIN tag is in use). An H3 marks the start of a subsection of the H2 before it. H4 marks the start of a subsection of the H3 before it. I would hope you could follow this logic progression for H5 and H6. Even lowly HR does not mean "draw a line across the screen", it represents where a grammatical horizontal rule (which could be any appearance) is applied at a change of topic or section.

        Just as UL/OL mean a list of choices or short bullet points, NOT "this section is a general list" or "I want bullets or numbers before these items".

        There are also rules as to which tags are valid inside others. For example P -- a grammatical paragraph block level structure -- is NOT supposed to have other block level tags (DIV, H1, etc) inside it. Same for H1 which is block-level. OL/UL can only have LI as their direct children, which is why plastering in a DIV as a sibling to a LI is nonsense.

        It's why I actually like to point people at this 20+ year old reference so you can pay attention to specific details.

        https://www.htmlhelp.com/reference/html40/

        As it's 1) proof positive I'm not saying anything new, and 2) contains details from the specification most tutorials -- like those from sleazy dirtbags like W3Schools -- often omit. For example let's look at UL:

        https://www.htmlhelp.com/reference/html40/lists/ul.html

        Specifically the part that reads:


        Contents One or more LI elements

        Contained in BLOCKQUOTE, BODY, BUTTON, DD, DEL, DIV, FIELDSET, FORM, INS, LI, MAP, NOSCRIPT, OBJECT, TD, TH

        It tells you what can be direct children of it, and what tags you can use it inside. EVERY tag has rules like this that you should learn before you write a single line of HTML. Always has, the problem is a LOT of tutorials gloss over details like this.

        Also why in the modern era I suggest that when you use a tag as a beginner, check that reference and/or the one at MDN to make sure you understand the tag.

        MDN HTML reference:
        https://developer.mozilla.org/en-US/...HTML/Reference

        Which if we look at UL there:
        https://developer.mozilla.org/en-US/...ML/Element/ul]

        We can see in modern HTML that SCRIPT and TEMPLATE have been added as valid in HTML 5, but otherwise things remain largely unchanged.

        Just as if you look at their H1..H6 page:
        https://developer.mozilla.org/en-US/...ading_Elements

        It has an example of how the ordering works, and their usage notes support what I said about them.

        If you choose ANY of your semantic tags (aka all tags other than DIV, SPAN, and <A>nchor) because of how you want things to look, you're doing it all wrong. The same goes for classes which is why things like "text-shadow col-4-s, col-6-m" that "frameworks" use are utter garbage.

        ... and it's why if you see things like that run for the hills. It's the core of why HTML, CSS, and JavaScript frameworks are monuments to developer ignorance, incompetence, and ineptitude.

        Until you've got HTML/CSS hammered down properly for at least the base template, you really have little business trying to slice it up into a back end.

        Now, that said, if you want to put on the big-boy pants and work with back-end code PHP isn't a bad place to start, but some simple good practices could REALLY help you out here.

        I have to go out and about for a bit, braving the storm as it were... but when I get back I'll toss together a simple example to show you how I'd handle the templating and some simple functionality as a base you could build off of quickly and easily.
        I'll kill you and your dreams tonight, begin new life.
        Bleed your death upon me, let your bloodline feed my youth.
        https://cutcodedown.com

        Comment


        • #5
          Somehow, I am not getting emails that tell me when posts are posted. I will have to look in my dashboard to figure out why. So, sorry for not responding sooner. As to what you have posted thanks for the long post. Lots of info to absorb. I do note that I have an aversion to picking up any books on how to write code properly because I have found that 99.99% of those books are written very poorly from a study perspective. Larry Ullman's book on PHP is an example of a really horribly written book. Up to a point I found it great then suddenly a gradient or three (or more) has been skipped and I have no idea what he is talking about. That is all down to an incorrect application of teaching - skipped gradients, assuming that the reader understands something without explaining it first, etc. Bloody horrible.

          So I tend to 'learn by the seat of my pants' when needed, which doesn't make for very consistent and elegant coding. My attitude has been that if it works why change it? What tends to happen is that the code eventually stops working because the PHP versions get updated on servers (or when I have to move my hosting the versions of PHP that I need are no longer available). I still have sites that can only run on PHP 5.4.

          I have this attitude because I have found that I programmers/coders tend to rip people off. An example is my father. He paid $4,500 (equivalent) to someone to build a site for him back in 2003. The guy then disappeared leaving my dad's site not functioning correctly. While driving from Toronto to LA I would go into a library every morning for an hour or two to work on the site and see if I could fix it. It was written in .ASP which I had never come across or worked with before, yet by the time I arrived in LA I had managed to fix the site so that it worked properly. Did my head in though!

          So, I can get things working by looking the problems up and applying the solution or multiple solutions. I don't really care how it works, only that it does.

          These days though things have become rather complicated with the advent of the media tag in css to make sites work on all sorts of devices. On top of that one has Bootstrap to contend with.

          On the site I am working on, it is largely finished and all I have to do now is get the menu to work correctly on mobile phones/tablets so that the menu expands like the rest of the links. There is only one small problem to deal with and that is the color of the text in the menu links when the page is active. On the drop down menu links the color of the text when on one of those pages is teal whereas the others are white. I may leave it as it is though, but it does bother me a bit.
          Last edited by judgedredd; Jul 21, 2020, 06:43 PM.

          Comment


          • #6


            On top of that one has Bootstrap to contend with.
            Don't contend with it, simply avoid it like the plague.

            coothead
            ~ the original bald headed old fart ~

            Comment


            • #7
              coothead,

              I just tried to see what would happen to the site if I commented that css file out (Bootstrap) - it broke the site. Oh well....

              Comment


              • #8
                Hi there judgedredd,

                So you did not avoid it like the plague, then.
                That really is a shame,
                All is not lost though, as you can now create your own CSS for your site.

                Trust me, you won't regret it's removal in the fullness of time.

                coothead
                ~ the original bald headed old fart ~

                Comment


                • #9
                  That's going to be fun since I am not well versed in CSS and replacing every element's code with new stuff to work on all devices. Do you have any suggestions as to how to do this?

                  Comment


                  • #10
                    Hi there judgedredd,

                    as he does not seem to be around at the moment,
                    I will let you have a link to just one of deathshadow's
                    comments on, as he refers to it, BootCrap...

                    How the blazes is bootstrap "easier"?


                    coothead

                    ~ the original bald headed old fart ~

                    Comment


                    • #11


                      I am not well versed in CSS.
                      Do you have any suggestions.
                      Yes I do, learn CSS, chapter and verse.

                      coothead

                      ~ the original bald headed old fart ~

                      Comment


                      • #12
                        Thanks.

                        Comment


                        • #13
                          judgedredd,

                          I noticed the sites that were previously shown have been removed?

                          Anyway this is the way I would develop your Single Page Application:, Notice the included/required files which can easily be toggled. I prefer working on a single file at a time because it is easier to validate and remove bugs.

                          File: index-001.php // note 001 is first version and further versions appear alphabetically when browsing
                          PHP Code:
                          <?php
                          // validates THIS FILE ONLY
                          declare(strict_types=1);

                          // following two items applies to this file and ALL included/required files
                          error_reporting(-1);
                          ini_set('display_errors''true');

                          $TITLE 'FRAMEWORK'// available to ALL included/required fiels

                          require 'includes/header.php';

                          echo 
                          '<body>';
                          echo 
                          '<h1>' .$TITLE .'</h1>';

                          // ALTERNATIVE PHP SYNTAX BECAUSE CURLY BRACES ARE NOT EASY TO SEE
                          // 1 === TRUE and 0 === FALSE
                          if(1) : require 'includes/top-menu-001.php'; endif;
                          echo 
                          $links// set in previous required file

                          if(0) : require 'includes/top-menu-002.php'; endif;
                          if(
                          0) : require 'includes/top-menu-003.php'; endif;
                          if(
                          0) : require 'includes/top-menu-004.php'; endif;

                          if(
                          1) : require 'includes/footer.php'; endif;

                          echo 
                          '</body></html>
                          [br]
                          [br]

                          File: includes/top-menu-001.php // note 001 is first version and further versions appear alphabetically when browsing
                          PHP Code:
                          <?php declare(strict_types=1); // validates THIS FILE ONLY

                          // FILE: top+menu-001.php

                          $aLinks = [
                          'index' => 'HOMEe',
                          'about' => 'Aout me',
                          'HealingMinistries' => 'HealingMinistries',
                          'services' => 'services',
                          'criticaltesting' => 'criticaltesting',
                          'watertesting' => 'watertesting',
                          'testimonials' => 'testimonials',
                          'vax-re-ed' => 'VAX\' RE-EDUCATION',
                          '1200-studies' => 'Dr. Alan Palmer - 1,200 studies',
                          'childrensHDorg' => 'Childrens Health Defense.org',
                          'corvela-it' => 'Corvelva.it Vaccine Authority Italy',
                          'physiciansRT' => 'PHYSICIANS RT',
                          'holisticVM' => 'HOLISTIC VET MEDICINE',
                          'self-help' => 'SELF-HELP RESOURCES',
                          'real-global-news' => 'REAL GLOBAL NEWS',
                          'rgn' => 'rgn',
                          'js' => 'js',
                          'naturalnews' => 'naturalnews',
                          'other' => 'other',
                          'contact' => 'contact',
                          ];

                          $links '<ul class="nav navbar-nav">';
                          if(
                          1):
                          foreach(
                          $aLinks as $key => $item) :
                          $links .= "
                          <li>
                          <a href='
                          {$key}.php'>
                          $item
                          </a>
                          </li>
                          "
                          ;
                          endforeach;
                          endif;
                          $links .= '</ul>';

                          if( isset(
                          $DEBUG_STUFF) ) :
                            echo 
                          '<pre>'// adds line-feeds
                            
                          print_r($aLinks);
                            echo 
                          '<hr>';
                            
                          var_dump($aLinks);
                            
                          highlight_file(__FILE__);
                          echo 
                          '</pre>';
                          endif;
                          Last edited by JOhn_Betong; Jul 22, 2020, 01:05 AM.

                          Comment


                          • #14
                            JOhn_Betong, Thanks for you post.

                            First of all the sites given as references to what I am doing still work and are there. They have not been removed but they HAVE been censored. I click on the links in my Maxthon browser and they open in new tabs. If you are using Chrome, Chromium or FireFox you will find they don't appear or they pretend it doesn't exist. Don't believe me? Download Maxthon (http://maxthon.com) and see for yourself. The site I am 'revamping' has a lot of info that PROVES vaccines are dangerous which is why it is being censored at the browser level. But this is not a forum for that sort of topic....

                            Ayway, how do I implement your solution? It looks elegant and I can sense that it would solve a lot of problems but am at a loss as to how to incorporate it into the new site.

                            coothead, I had a look at the link you provided and I also went to deathshadow's own site and read what he had to say about bootstrap. I agree with all that he has said and am a bit annoyed with myself for thinking that one 'had to use' bootstrap to make a good responsive site. I can now see that that is totally not true. But since Twitter is the one that came up with it I am not surprised that that incorrect viewpoint is prevalent in the coding world. Twitter employ idiots and people who's sole aim is to undermine society and the 1st amendment. I got banned for calling Kathy Gifford an ugly Bodaciously Interesting True Child of Hell! (Didn't write it that way obviously, just the bold letters). Go figure. I get banned for stating a fact and she is allowed to show a severed head of POTUS and nothing happens to her. Anyway, another conversation for another day....

                            Bringing up deathshadows point about correct and comprehensive information about creating correct code, I have not found anywhere where one can avail one's self of that info. I had no clue that W3C was such a Silly Horrible Insecure TaTY place to go to as I have gone there quite a bit to understand and learn about things when I needed to. So if not there then where?

                            I like to code sites by hand and my personal site: http://matrixfiles.com is written 'incorrectly' using tables. The code is from the 90s but it works. Even on iPhones. But it is now topping over 300 pages and has 105+GB of data so the more I delay the more difficult it will become. I have pondered how to create a modern (back-end wise) site using HTML5 (mostly divs) and CSS but have not found a resource that will give correct info about these languages, as pointed out by deathshaow. There must be a book or a course somewhere where it is correctly taught? I just haven't found it yet.
                            Last edited by judgedredd; Jul 22, 2020, 04:17 AM.

                            Comment


                            • #15
                              Hi @judgedredd,

                              > Ayway, how do I implement your solution? It looks elegant and I can sense that it would solve a lot of problems but am at a loss as to how to incorporate it into the new site.

                              Copy the index-001.php file into the root folder and browse to the file instead of index.php

                              Copy the other file into the includes folder. Header.php and footer also need creating and copying.

                              Take note of any errors or warnings, Google if there are any and try to fix or post back here.

                              Comment

                              Working...
                              X