Jump to content

If field is empty


Waddy

Recommended Posts

I have a number of fields to display on a page, from a mysql query,  some fields are empty, some not. depends on what they choose on the original form.

 

I am trying to display on the form results on a page formatted using the below:

 

If the mysql field is empty, display an unchecked check box next to the result. If there is data in the field display a check box ticked.

 

What can i do to achieve this, can you point me in the right direction?

 

Results page using echo:

 

</TD><TD>Options: <input type='checkbox' CHECKED>". $row[17]. " </TD> = is not empty field
</TD><TD>Options: <input type='checkbox' UNCHECKED>". $row[17]. " </TD> = emtpy ,mysql field
</TD><TD>Options: <input type='checkbox' CHECKED>". $row[18]. " </TD> = not empty mysql field from query
</TD><TD>Options: <input type='checkbox' UNCHECKED>". $row[18]. " </TD> = Empty field in mysql

 

I am trying to show Rows 1 to 16 to display normally, rows 17 to 30 use the above logic.

 

There are about 30 fields to display like this, the others are required fields and are displayed no matter what.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.