[thelist] 'not' in PHP and other PHP newbie questions

Joel D Canfield joel at spinhead.com
Sun Mar 28 12:37:55 CST 2004


Before writing to the database, I want to check for values from the
form. If a value doesn't exist, I want to write defaults instead of
nulls (but I don't necessarily want to create these defaults in the db
itself, just in this iteration of the code.)

So, I want to say

     If there's no 'Address' data, write 'none' for the address

Does this not work?

    If !($Address)
        {
           $Address = 'none'
        }

Also, how do I get PHP to spit back errors instead of a blank page every
time there's a single syntax error anywhere on the page?

tenks

joel


More information about the thelist mailing list