This has been posted on other forum(s) but have been unable to resolve.
Is this a php quirk?

I have a two part problem associated with setting table data types and calling text labels (appear beside these values when written onto page). The labels should appear only when there is a real value in the column entered by the user, otherwise they don't appear on the page. Although the problem seems basic, here are some notes with why I haven't been able to do this:

Value types have been set to either 'varchar' or 'integers'.

Even though setting code to NOT NULL with default of 'o' works for echoing my code back:

for labels:

<?php if (!empty($row_Ret['JContPhone'])){echo '<font size="2" face="Arial Narrow">phone</font>';}

for the value itself:

<?php if (!empty($row_Ret['JContPhone'])){echo $row_Ret['JContPhone']; }

When I set the table NOT NULL with default of even '0' on column to make this work, which seems necessary: the error is kicking back "cannot be null" on the INSERT form field when left empty. Same for NOT NULL set to 'none' - same error messge "cannot be null". Basically I'll get an error message if I set to NOT NULL with any default value as long as the field is left empty on INSERT form.

Actually setting to '0' presents other problems (echoing back for control panel forms, repeat users) so I'll have to forget '0' but maybe the above could help.

A default value like "none": which would work for these other reasons like echoing back onto a form value for repeat users in control panel.

-However if I want to have this auto-inserted by mysql I'll have to set to a NULL value. But I've run into a snag with this since !NULL just doesn't work (as opposed to !empty above, or any !NULL has problems, also for '&&' ): see

'is_numeric' is out due to special characters (brackets/hypens/phone extensions)
'preg_match' is out due to special characters too

These may have possibly worked for certain values but I think what I really need is way to either use NULL values in tables with defaults, to accomodate the forms. Or something else altogether.

What does everybody use in the php world when they when to echo values and have text labels for values only when values entered by the user exist?

--would very much appreciate any help on this.