How to succeed in coding web pages

A few helpful hints.  First, finding coding solutions

  1. Google is your friend.  If you can't remember, or never saw, how to delete an array element in PHP, search for "php array delete element."  (If you use code, you must give credit in your comments; to do otherwise is academic dishonesty.)
  2. Google is your friend.
  3. No, really.

Expressions Web:

  1. Expressions Web is WYSIWYG, but it's not perfect.  Sometimes it will look different in the browser, so to be sure your page looks good, load it in the browser.
  2. Expressions Web is WYSIWYG for HTML and CSS, but not for PHP.  You can edit your PHP files in Expressions Web, but to run them, you've got to load them up in something that handles PHP, like XAMPP.

Windows

  1. To get a path in Windows, go to the folder you want and click the folder icon on the left:
    Paths in Windows, image 1
    to get this:
    Paths in Windows, image 2
    Cut and past that path name where you like.
  2. To get a command prompt, go to Start Menu, and type cmd in the Run... blank.
  3. To paste into a cmd window, right-click the background and select Paste.  To copy from, right click, select Select all, and hit Enter.  You get the whole screenful, so you'll have to edit out what you don't want.

PHP

  1. How to delete an array element in PHP.
  2. Checking end-of-file in PHP.
  3. One of the big problems in PHP (as with other programming) is knowing what your variables are doing.  So print them!  Like this:

    $insertedActivitiesID = mysql_insert_id ();

    echo "InsertedActivitiesID = $insertedActivitiesID<br>";

    That won't work for arrays and query results...but this will:

    print_r ($myArray); echo '<br>';