Forms+

We've seen....

Form Handling (beyond the basics)

Today...

  1. Make a form using as many of the types and attributes listed in Ch12 as seem 'comfortable'. Minimum of 10.

    ADD them ONE at a time.

    Before you 'test' the first one, add a print_r of your $_POST array as the 'executing' part of your php file.

    VIEW the results in your browser - AFTER ADDING EACH ONE.

    How many do you add before reloading your browser window?!? ONE! ONE!! ONE!!!
    Your form should be understandable and your $_POST array should be reflecting the communication.

    ADD notes into displayed file

    Do this as you come across tip's & gotcha's. Keep your notes neat and informative and 'near' the elements they are explaining.

    There is no need or reason to spend time styling this file. Keep styling simple, if you have it at all, and inside a SINGLE set of <style> tags

    WHEN YOU ARE DONE...

  2. Start a 'real' form that ...
    ... is closely related to YOUR normalized database. Or can be for a new database you envision working on. Do not PDO link to a database at this time, but definitely you should be using isset and processing the results somehow in your PHP. Do not use print_r or <pre> on this form EXCEPT as you work on it for debugging/development purposes.

    This form should not include development notes that user can see and should be beautifully styled (ie, NO PRE TAGS). You may place css rules inside a single pair of <style> tags in the same file OR place all of it in a linked css file. Do not use ANY inline styling; just tags with classes (and possibly id's though these should be very very few. No more than 2.)

    WHEN YOU ARE DONE...

  3. Email me a single TAR FILE with ALL OF THE files necessary to re-create your work: php, html, css (ie, all source)

    IDEALLY, this will be only two files, one file for each of 1 & 2 above. However, if you've linked in your css there may be more. Do not separate form from php processing. All in one!