close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Using Check Boxes in Forms

Thread began 7/11/2011 8:09 pm by Mike Perry | Last modified 7/12/2011 2:12 pm by Mike Perry | 697 views | 2 replies

Mike Perry

Using Check Boxes in Forms

I'm hardly a PHP guru, and need to use a check box to indicate whether an online article is active for display or not.

I have a check box for active in the Search, Update, and Insert pages. The articles database has a column called 'active'. The datatype is tinyint, NOT NULL, default = 0 (false).

What code do I alter to have the check box display as checked in the Update page when the article is already active and called to Update, what code is needed to insert a 0 in the Insert or Update pages when the article is not active, and use an unchecked value of 0 for searching for inactive articles and a checked value of 1 searching for active articles.

Error message for Insert and Update is "Column 'active' cannot be null. This occurs when the Active checkbox is left unchecked.

Thanks. . .


ETA: Search actually works okay -- finds active articles when checked and inactive when unchecked. . .

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...