47 thoughts on “PHP Tutorials: Register & Login (Part 3): Breaking up the Template

  1. Great Tutorial, however, Im having some issues. Breaking the website works great, however, when i do a further break e.g Overall Footer, or Login Widget, i get the following error: (Warning: include(../include/footer.php): failed to open stream: No such file or directory in C:xampphtdocsLoginRegisterincludeoverallfooter.php on line 2

    Warning: include(): Failed opening '../include/footer.php' for inclusion (include_path='C:xamppphpPEAR') in C:xampphtdocsLoginRegisterincludeoverallfooter.php on line 2) Please HelP!!!

  2. ( ! ) Warning: include(includes/widgets/login.php): failed to open stream: No such file or directory in C:wamp64wwwLoginincludesaside.php on line 2
    Call Stack
    # Time Memory Function Location
    1 0.0010 233912 {main}( ) …Register.php:0
    2 0.0020 236280 include( 'C:wamp64wwwLoginincludesoverallheader.php' ) …Register.php:1
    3 0.0030 238312 include( 'C:wamp64wwwLoginincludesaside.php' ) …header.php:7

    ( ! ) Warning: include(): Failed opening 'includes/widgets/login.php' for inclusion (include_path='.;C:phppear') in C:wamp64wwwLoginincludesaside.php on line 2
    Call Stack
    # Time Memory Function Location
    1 0.0010 233912 {main}( ) …Register.php:0
    2 0.0020 236280 include( 'C:wamp64wwwLoginincludesoverallheader.php' ) …Register.php:1
    3 0.0030 238312 include( 'C:wamp64wwwLoginincludesaside.php' ) …header.php:7

  3. I am finding that if you are using Sublime Text 2 you are not allowed to save changes to files once they are in the root folder.  My guess is that I am going to try and put it all together outside of the root folder and then place it in and test it.   I will let you know how it goes.

  4. I have been having issues with the include statement not working, after some time of looking at the comments here and stack overflow etc i realised i was running code through run option in notepad ++ instead of connecting in browser through http://localhost. All works great now, hope this helps and great tutorial :)

  5. where i use include, it doesn't work. For example if i want to include the nav, when i try to see the result te page will be without the nav and at the end, after i include all the parts will be shown only the h1 and the p tag. Is any explanation for that?

  6. Warning: mysql_result() expects parameter 1 to be resource, boolean given in Z:homeregistrationwwwcorefunctionsusers.php on line 4
    Array ( [0] => We can't find that username. Have you registered? )

  7. css 

    /*Resets */

    ul {padding:0px;
    margin:0 0 20px 0;
    list-style:none;
    }

    h1, h2 { padding:0px;
    margin: 0 0 20px 0;
    font-weight:normal;
    }

    p { padding:0; 
    margin: 0 0 20px 0;
    }

    a:link, a:visited {text-decoration:underline;
    color:#000;}

    a:hover {text-decoration:none;}

    ul li {padding:5px 0;}

    ul li input [type="text"], ul li input [type="password"] {
    width:200px;
    }

    /*Headers */

    h1 {font-size:1.8em;
    }

    h2 {font-size:1.4em;
    }

    .logo { font:2em Arial;
    margin:0 0 10px 0; 
    padding:0;
    width:200px;
    color:#efff;
    }

    /*Containers */

    body {background:lightslategray;
    font-family:Arial; 
    font-size:0.8em;}

    #container, footer { background :#efff;
    width:920px;
    margin:0 auto; 
    padding:20px;}

    header { width:940px;
    padding:10px;
    margin: 0 0 10px auto; 
    }

    #container {min-height:500px;
    border-radius:5px 5px 0 0;}

    footer {border-radius:5px 5px 0 0;}

    .widget {margin-bottom:20px;
    }

    .widget h2 {margin: 0 0 10px auto; 
    padding:0 px; 
    font-weight:normal;
    border-bottom;1px solid #ddd;}

    .widget .inner {margin:0 10px;

    }

    /*Navigation */

    nav {float:left;
    }

    nav ul {margin:0;
    }

    nav ul li {display :inline;
    margin-right:10px;
    }

    nav ul li a {text-decoration:none;
    }

    nav ul li.current{font-weight:bold;
    }

    nav ul li.last{border-right:0;}

    /*Aside */

    aside {width:260px;
    float:right;
    border-left:1px dashed #aaa;
    padding-left:15px;}

    /login/

    #login li.link{margin-top:5px;
    }

    /footer/

    footer {border-top:1px dashed #ddd;
    color:#999;
    }

    /Misc/

    .clear {clear:both;

    }

  8. Is there a tutorial without the breaking up of website, i do know what im doing but the breaking up is OTT im tryin to find a good secure login system without includes or without so many 3 or 4 tops

  9. Where am I supposed to download the css page?
    I'm just going to code it myself as I've screenshotted when he went onto the css page so I now have the code but is there a easier way to get it? I didn't see anything on the site.

  10. Really Nice tutorial, the ways you explain it i love to apply in my own code. 

    could you please make a tutorial on list of items page with styling and also connect those items with the database. I'm developing an e-commerce website but i got some problems in displaying lists of items with images and also for details page where user can see more details of each item.

Leave A Comment

Your email address will not be published. Required fields are marked *