close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

We've been using the MySQLi Server Behaviors to insert data from our Contact form on our website for sometime with no problems. Yesterday I added a checkbox to the form named "emailReceive" for our contacts to check if they wish to receive email comm

Thread began 2/26/2016 1:37 pm by markhaynes75235 | Last modified 3/01/2016 10:36 am by markhaynes75235 | 2133 views | 4 replies

markhaynes75235

We've been using the MySQLi Server Behaviors to insert data from our Contact form on our website for sometime with no problems. Yesterday I added a checkbox to the form named "emailReceive" for our contacts to check if they wish to receive email communicat

You can see the behavior by going to http://www.abilityconnectiontexas.org and clicking the "CONTACT US" link on the nav bar. Fill out and submit the form on the CONTACT US form that appears on the megamenu. Everything will behave as expected on the front end, but the checkbox data is not inserted on the database. I've attached a screenshot of the Column Bindings tab in the Server Behavior and a screenshot of the test results as they appear in PHPMySQLAdmin when browsing the table data. The code in the page related to this issue is shown below:

<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$InsertQuery = new WA_MySQLi_Query($actdb);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "visitors";
$InsertQuery->bindColumn("firstname", "s", "".($rsContacts->getColumnVal("contactFirstName")) ."", "WA_DEFAULT");
$InsertQuery->bindColumn("lastname", "s", "".($rsContacts->getColumnVal("contactLastName")) ."", "WA_DEFAULT");
$InsertQuery->bindColumn("fullname", "s", "".((isset($_POST["name"]))?$_POST["name"]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("email", "s", "".((isset($_POST["email"]))?$_POST["email"]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("emailReceive", "c", "".((isset($_POST["emailReceive"]))?$_POST["emailReceive"]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("status", "i", "4", "WA_DEFAULT");
$InsertQuery->bindColumn("regDate", "t", "".((isset($_POST["regDate"]))?$_POST["regDate"]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("sourceSiteID", "i", "".((isset($_POST["pgSrc"]))?$_POST["pgSrc"]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("sourceSiteName", "s", "".($rsContacts->getColumnVal("contactDeptName")) ."", "WA_DEFAULT");
$InsertQuery->saveInSession("visitorID");
$InsertQuery->execute();
$InsertGoTo = "";
if (function_exists("rel2abs")) $InsertGoTo = $InsertGoTo?rel2abs($InsertGoTo,dirname(__FILE__)):"";
$InsertQuery->redirect($InsertGoTo);
}
?>

Thanks again for your help!

enthusiastically,
Mark

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