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

rating

Inserting check box

Thread began 5/21/2018 11:33 am by john70964 | Last modified 5/29/2018 12:32 pm by Ray Borduin | 153 views | 8 replies |

john70964

Inserting check box

Is there a tutorial on how to insert a checkbox into an existing .php page and recording this into a database.
I have looked but cannot locate one.
Thank you

John

Sign in to reply to this post

Ray BorduinWebAssist

There is no tutorial for it, but it should be very simple to figure out.

Just add the checkbox using Insert->Form->Checkbox where you want it to appear.

Then double click on your database insert server behavior to bind the checkbox to the column where you want it recorded, or add an insert server behavior if you don't already have one.

Sign in to reply to this post

john70964

Thanks Ray,
That helped a lot.
I cannot get the result to show in the database field
The field is tinyint - length1 - allow null.
Can you see where the code is incorrect in the attached document?

Sign in to reply to this post

Ray BorduinWebAssist

What is the column name you added? Is it saved properly in the database? What table did you add the column to? I need more information to analyze what might be wrong.

Sign in to reply to this post

john70964

Column Name: ContactPermission
Added to table named Boats
It is the last field in the table.
Is it saved properly in the database? Yes as far as I can tell.
ContactPermission - tinyint
Length1
Decimals 0
Allow Null

I forgot to mention it is on localhost at the moment.

Sign in to reply to this post

Ray BorduinWebAssist

I think your checkbox would just be:

<input name="ContactPermission" type="checkbox" id="ContactPermission" value="1" />

Sign in to reply to this post

john70964

please see PM

Sign in to reply to this post

Ray BorduinWebAssist

It looks like your columns are in the wrong order. Your columns have: MeasureInLOA, MeasureInBeam, ContactPermission

but your values have:
GetSQLValueString($_POST['LOA_Measure'], "text"),
GetSQLValueString($_POST['ContactPermission'], "tinyint"),
GetSQLValueString($_POST['Beam_Measure'], "text"));

It would have to match the order from above like:
GetSQLValueString($_POST['LOA_Measure'], "text"),
GetSQLValueString($_POST['Beam_Measure'], "text"),
GetSQLValueString($_POST['ContactPermission'], "tinyint"));

Sign in to reply to this post

john70964

Many thanks Ray.
That solved the problem!
Cheers

John

Sign in to reply to this post

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

Content

rating

Layout

rating

Ease of use

rating

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...