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

Tick Box

Thread began 6/13/2018 4:18 pm by john70964 | Last modified 6/22/2018 12:33 pm by Ray Borduin | 204 views | 10 replies |

john70964

Tick Box

Hi Ray
Would you please have a look at a form I have been trying to get working but cannot.
I was able to get a tick box working and validating correctly on a new simplified form but when I try to update
an existing form it does not seem to work.
I did get the tick box working and updating the database but have lost that again.

I am attaching more details in the private message.

Sign in to reply to this post

Ray BorduinWebAssist

Try updating this line:
GetSQLValueString($_POST['ContactPermission'], "tinyint"),

to:
GetSQLValueString($_POST['ContactPermission'], "int", "1", "0"),

Sign in to reply to this post

john70964

Thanks Ray,
On localhost when I place
GetSQLValueString(isset($_POST['ContactPermission'], "int", "1", "0"),
I get a syntax error on lines 96 and 97
If I remove (isset the sytax error goes away.
However the ContactPermission field in the database remains at Null.

Sign in to reply to this post

Ray BorduinWebAssist

Yes, that part should not have been there. I've updated the code above. I feel like it should be working at this point.... however let's try this one more variation:

GetSQLValueString(isset($_POST['ContactPermission'])?"1":"0", "int"),

I see you are using the standard Dreamweaver update server behavior. Another option is to update to the webassist version which is much more versatile.

Sign in to reply to this post

john70964

Thanks Ray
That gave the same result, Null.

Re: I see you are using the standard Dreamweaver update server behavior. Another option is to update to the Webassist version which is much more versatile.
In creating Recordsets I usually Select Server Behaviours + and then click on Recordset at the top of the list.

Perhaps I should be using + Webassist > Mysqli Recordset. If so is it OK to have web pages on a site some using MySql and some using MySqli ?

Sign in to reply to this post

Ray BorduinWebAssist

You can use both mySQL and MySQLi on the same site or even the same page without any issues. I looked at the code on the live page and it is still the original version. Are you sure you were updating and testing the correct file?

Sign in to reply to this post

john70964

Sorry Ray
I have just been uploading to localhost but I have updated the remote server just now.

Sign in to reply to this post

Ray BorduinWebAssist

I see you have your fields in the wrong order. You have MeasureInBeam, ContactPermission in your insert statement, but when you list the values you have:

GetSQLValueString(isset($_POST['ContactPermission'])?"1":"0", "int"),
GetSQLValueString($_POST['Beam_Measure'], "text"));

That needs to be consistent. This is why hand editing is usually the wrong choice when you have Server Behaviors you can update ;)

The easiest solution is to switch the order of the columns above. I've done that and uploaded the page so you can see and compare.

Sign in to reply to this post

john70964

Hello Ray,
Thank you for your much appreciated help in getting the form working.

Trying to understand more fully what is going on on this form, I opened the
SB Insert Record behaviour (as you suggested I believe) and was asked to install MySqli.

I think I may have worked with MySqli previously on this page.

I received a Dreamweaver message attached.
The elements were set to None.
I wondered if I should delete those elements as they have been deleted on the form already some time ago
but could not see how this would be carried out?

Picture attached

Later:
Hello Ray
I am getting there and learning many things!

I have one more item that does not seem to behave as expected.
The field Description1
listed under Boat information is being completed correctly, but the
validation 'Show if' shows in spite of this when the page is shown in a browser.

The code looks correct to me...

I notice that I have two Binding groups
1 WA Validated Entries (boats_InsertCopy2.php)
2 WA Validated Entries (boats_Insert.php)

Maybe this is because I copied boats_InsertCopy2.php to avoid overwriting the original?
Maybe one file should be deleted?

I have uploaded the files please see the PM.
Many thanks
John

Sign in to reply to this post

Ray BorduinWebAssist

You had copied and pasted the line for the validation and didn't increment the identifier. That means both the boat information and terms checkbox were using the same validation. It was probably the terms validation that was failing causing both messages to show. I updated the validation code to address the issue.

Sign in to reply to this post
loading

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