Help with homepage

Discussion in 'Web Programming' started by WzdsRS, Jul 22, 2012.

Help with homepage
  1. Unread #1 - Jul 22, 2012 at 10:13 PM
  2. WzdsRS
    Joined:
    Mar 20, 2011
    Posts:
    240
    Referrals:
    0
    Sythe Gold:
    0

    WzdsRS Active Member

    Help with homepage

    I'm looking for someone who is skilled with scripts. From what I understand, that'd what I need someone for.

    I'd like to incorporate something like a news page that I can write, edit, and customize the news I post. I don't know how hard that is to understand, but I can elaborate more if need be.

    Anyone know how to go about that? Also, while I'm at it... How do I make a heading like let's say the Sythe logo is on every page. Is that through CSS?
     
  3. Unread #2 - Jul 23, 2012 at 2:43 AM
  4. Jazz00006
    Joined:
    Aug 26, 2005
    Posts:
    807
    Referrals:
    0
    Sythe Gold:
    0

    Jazz00006 Apprentice
    Visual Basic Programmers

    Help with homepage

  5. Unread #3 - Aug 7, 2012 at 7:25 PM
  6. Dial
    Joined:
    Jul 12, 2010
    Posts:
    5,739
    Referrals:
    32
    Sythe Gold:
    126
    Sythe's 10th Anniversary Two Factor Authentication User MushyMuncher Member of the Month Winner Easter 2015

    Dial Experienced Web Developer
    $200 USD Donor New Pirate PHP Programmers

    Help with homepage

    If you decide to go with Jazz's idea, then ignore this. But if you don't want to use Wordpress then...

    To have a heading that's the same on every page, you should add

    Code:
    include('namehere.html');
    At the top of your PHP files, and then in namehere.html have your header. The same thing with a footer as well but at the bottom of your page.

    As for the news thing, you could have a page that's password protected (for you only) where you have a simple form to upload what you write into a database. Then on another page, write a script to retrieve the data from the database.

    I realize this thread is a bit old, but if you need any help then reply and I'll gladly help you with this.
     
  7. Unread #4 - Aug 13, 2012 at 4:48 PM
  8. Robbie_h
    Joined:
    Aug 7, 2012
    Posts:
    63
    Referrals:
    0
    Sythe Gold:
    0

    Robbie_h Member
    Banned

    Help with homepage

    How do i make my own website
     
  9. Unread #5 - Aug 25, 2012 at 1:38 PM
  10. Tyro
    Joined:
    Nov 23, 2009
    Posts:
    2,297
    Referrals:
    0
    Sythe Gold:
    0

    Tyro Grand Master
    Secret Asian Man

    Help with homepage

    If you're trying to learn to program or you're interested in web development in the future, I suggest you try to build it from the ground up. I can help you out if you need it.

    Dialatic is mostly right, but I'll make a few clarifications, because it seems like OP is inexperienced.

    PHP is a language for generating server-side code. This makes it useful for dynamic pages, where you'll be outputting different HTML based upon the day, new blog posts, the visitor's browser, etc.

    CSS stands for "cascading style sheet." It's useful for quickly styling multiple elements. For instance, rather than writing...

    Code:
    <div style='float: left; position: relative; width: 100px; height: 100px; background: #000; border: 2px solid #FFF; box-shadow: 3px 3px 0 rgba(0,0,0,0.3);'>yada</div>
    ...ever time you draw a box, you could write...

    Code:
    <div class='box'>yada</div>
    ...and put the styling in your CSS file...

    Code:
    .box{ 
         float: left; 
         position: relative; 
         width: 100px; 
         height: 100px; 
         background: #000; 
         border: 2px solid #FFF; 
         box-shadow: 3px 3px 0 rgba(0,0,0,0.3); 
    } 
    Now, on to your question specifically.

    If you don't plan on investing much time in programming in the future, Jazz's suggestion is absolutely right. Otherwise, you could manually edit the page (tiresome) with each change, or build your own CMS (content management system). The latter option will be very difficult for your skill level, but you'll learn a great deal. You can find tutorials on building a PHP CMS all over the internet.

    You'll want to create index.php and reference the header from this file. You'll probably want a footer as well.

    Code:
    <?php
         include 'header.php';
         echo "This is the content of my website.";
         include 'footer.php';
    ?>
    Now you can put static code inside header.php and footer.php.

    header.php:

    Code:
         <head>
              <title>My first website</title>
              <link rel='stylesheet' href='styles.css' type='text/css' />
         </head>
         <body>
              <div class='logo'>
                   <img src='images/logo.png' />
              </div>
              <div class='content'>
    footer.php:

    Code:
              </div>
         </body>
    
    This means that when the user visits www.WzdsRS.com/index.php, the server will send them the following HTML:

    Code:
         <head>
              <title>My first website</title>
              <link rel='stylesheet' href='styles.css' type='text/css' />
         </head>
         <body>
              <div class='logo'>
                   <img src='images/logo.png' />
              </div>
              <div class='content'>
                   This is the content of my website.
              </div>
         </body>
    
    I hope that clears a few things up for you. Sorry if I got some of the markup wrong, I'm a bit rusty and don't have time to reread this. Let me know if you have any other questions.
     
< Free Hosting Tech Support | [need]Proxy service[help] >

Users viewing this thread
1 guest


 
 
Adblock breaks this site