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.
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.
A simple way to think of PHP is like the robots in an automotive assembly plant, where HTML is the car PHP produces.