I Have A hard Time Grasping What PHP Is And Does

Discussion in 'PHP' started by SlaveGirlTrainer, Jun 26, 2010.

  1. #1
    Hi everyone. I hope I am not the only one that has this problem. I have a godaddy hosting account. I tried to set up a PHP page and can't figure it out.
     
    SlaveGirlTrainer, Jun 26, 2010 IP
  2. Gray Fox

    Gray Fox Well-Known Member

    Messages:
    196
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    130
    #2
    Why don't you start at PHP's wiki page?
     
    Gray Fox, Jun 26, 2010 IP
  3. ZeeshanButt

    ZeeshanButt Well-Known Member

    Messages:
    307
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    110
    #3
    What are you trying to do with that page?
     
    ZeeshanButt, Jun 26, 2010 IP
  4. themullet

    themullet Member

    Messages:
    110
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #4
    Tizag has a nice php tutorial. Sometimes use it when forget something.
     
    themullet, Jun 26, 2010 IP
  5. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #5
    Are you sure that you need a PHP page and not an HTML page? Why do you want to use PHP?
     
    pipes, Jun 27, 2010 IP
  6. SwedBo

    SwedBo Peon

    Messages:
    77
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You can't figure out .. what ?
     
    SwedBo, Jun 27, 2010 IP
  7. sarahk

    sarahk iTamer Staff

    Messages:
    28,901
    Likes Received:
    4,555
    Best Answers:
    123
    Trophy Points:
    665
    #7
    PHP is a processing language that takes instructions and does stuff.

    Most commonly we get it to output HTML pages but it can generate XML, images, send emails etc.

    PHP is run on the server so your hard work is protected from theft. Javascript, on the other hand, is run on the actual browser and is visible to the determined user.

    Try copying this to a "test.php" file, upload it and run it.
    <?php
    
    echo '<h1>Hello World</h1>';
    echo '<p>',date('dd-mm-YY'),'</p>';
    
    $fruit = array('banana', 'apple', 'pear');
    echo '<ul>';
    foreach($fruit as $item) echo "<li>{$item}</li>\n";
    echo '</ul>';
    ?>
    PHP:
    Once you've done that your next step is to research all the bits that are underlined and understand what they do. Read up on the difference between single quotes and double quotes and when to use {}

    You still need to work out database connections and mail but you'll be well on your way.

    Before you go trying to code a website from scratch (as gratifying as that can be) consider using a Content Management System (CMS) such as WordPress, Joomla or Drupal. Your fledgling PHP skills might be put to better use making template modifications and leaving all the heaving coding to the teams behind those systems.
     
    sarahk, Jun 27, 2010 IP
  8. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #8
    A simple way to think of PHP is like the robots in an automotive assembly plant, where HTML is the car PHP produces.
     
    joebert, Jun 27, 2010 IP
  9. Silph

    Silph Peon

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    This actually makes sense^
     
    Silph, Jun 28, 2010 IP