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

MySQLi Insert process not working

Thread began 10/03/2019 1:59 pm by sandy170299 | Last modified 10/05/2019 12:29 am by sandy170299 | 12 views | 1 replies

sandy170299

MySQLi Insert process not working

Can you tell me why this insert process is not working? I have a form, which has some validations on it. I have a server behavior (Button: submit pressed) which makes sure that the password and the confirm password fields are the same. After this, I have a MySQLi insert server behavior (also Button: submit pressed) which is supposed to insert the record into the users table. Once I click the submit button, it does NOT recognize the form validation to compare the password fields, not does it insert the record into the database. The progress bar just spins and spins and spins. Here is my code. I just upgraded DataAssist and I can't get any of the server behaviors to work. I just don't know what I'm doing wrong. I started with the form builder, and then scrapped a lot of it because that wasn't working either.

Thank you.

<?php require_once('../Connections/numeroseti.php'); ?>
<?php require_once('../webassist/mysqli/queryobj.php'); ?>
<?php require_once("../webassist/form_validations/wavt_scripts_php.php"); ?>
<?php require_once("../webassist/form_validations/wavt_validatedform_php.php"); ?>
<?php
if (isset($_POST["submit"]) || isset($_POST["submit_x"])) {
$WAFV_Redirect = "";
$_SESSION['WAVT_userregistration_205_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateLE(((isset($_POST["password_confirm"]))?$_POST["password_confirm"]:"") . "",((isset($_POST["password"]))?$_POST["password"]:"") . "",true,1);

if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"userregistration_205");
}
}
?>
<?php
if (isset($_POST["submit"]) || isset($_POST["submit_x"])) {
$InsertQuery = new WA_MySQLi_Query($numeroseti);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "users";
$InsertQuery->bindColumn("acct_number", "i", "".((isset($_POST["acct_number"]))?$_POST["acct_number"]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("user_name", "s", "".((isset($_POST["user_name"]))?$_POST["user_name"]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("user_password_hash", "s", "".((isset($_POST["password"]))?$_POST["password"]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("user_email", "s", "".((isset($_POST["Email_Address"]))?$_POST["Email_Address"]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("referrer", "i", "".((isset($_POST["referrer"]))?$_POST["referrer"]:"") ."", "WA_DEFAULT");
$InsertQuery->saveInSession("");
$InsertQuery->execute();
$InsertGoTo = "";
if (function_exists("rel2abs")) $InsertGoTo = $InsertGoTo?rel2abs($InsertGoTo,dirname(__FILE__)):"";
$InsertQuery->redirect($InsertGoTo);
}
?>
<!doctype html>
<html><!-- InstanceBegin template="/Templates/tmp.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta id="p7DMM" name="viewport" content="width=device-width">
<meta charset="utf-8">
<!-- InstanceBeginEditable name="doctitle" -->
<title>Numero Set Admin Area</title>
<script src="../webassist/jq_validation/jquery.h5validate.js"></script>
<script>
var SimpleRegistration_Basic_SJS_Opts = {
focusout: true,
focusin: false,
change: false,
keyup: false,
popupClass: "Spacious",
pointedAt: "right",
fieldOffset: -10,
fieldMargin: 2,
position: "left",
direction: "left",
border: 1,
offset: 25,
closeText: "✖",
percentWidth: 100,
orientation: "bottom"
};
function SimpleRegistration_Basic_SJS_Validate() {
$("#SimpleRegistration_Basic_SJS").h5Validate(SimpleRegistration_Basic_SJS_Opts);
}
$(document).ready(function () {
SimpleRegistration_Basic_SJS_Validate()
ConvertServerErrors(SimpleRegistration_Basic_SJS_Opts);
});
</script>
<script>
var SimpleRegistration_Basic_Default_Opts = {
focusout: true,
focusin: false,
change: false,
keyup: false,
popupClass: "Spacious",
pointedAt: "right",
fieldOffset: -10,
fieldMargin: 2,
position: "left",
direction: "left",
border: 1,
offset: 25,
closeText: "✖",
percentWidth: 100,
orientation: "bottom"
};
function SimpleRegistration_Basic_Default_Validate() {
$("#SimpleRegistration_Basic_Default").h5Validate(SimpleRegistration_Basic_Default_Opts);
}
$(document).ready(function () {
SimpleRegistration_Basic_Default_Validate()
ConvertServerErrors(SimpleRegistration_Basic_Default_Opts);
});
</script>
<script>
var SimpleRegistration_Basic_Default_Opts = {
focusout: true,
focusin: false,
change: false,
keyup: false,
popupClass: "Spacious",
pointedAt: "right",
fieldOffset: -10,
fieldMargin: 2,
position: "left",
direction: "left",
border: 1,
offset: 25,
closeText: "✖",
percentWidth: 100,
orientation: "bottom"
};
function SimpleRegistration_Basic_Default_Validate() {
$("#SimpleRegistration_Basic_Default").h5Validate(SimpleRegistration_Basic_Default_Opts);
}
$(document).ready(function () {
SimpleRegistration_Basic_Default_Validate()
ConvertServerErrors(SimpleRegistration_Basic_Default_Opts);
});
</script>
<script>
var SimpleRegistration_Basic_Default_Opts = {
focusout: true,
focusin: false,
change: false,
keyup: false,
popupClass: "Spacious",
pointedAt: "right",
fieldOffset: -10,
fieldMargin: 2,
position: "left",
direction: "left",
border: 1,
offset: 25,
closeText: "✖",
percentWidth: 100,
orientation: "bottom"
};
function SimpleRegistration_Basic_Default_Validate() {
$("#SimpleRegistration_Basic_Default").h5Validate(SimpleRegistration_Basic_Default_Opts);
}
$(document).ready(function () {
SimpleRegistration_Basic_Default_Validate()
ConvertServerErrors(SimpleRegistration_Basic_Default_Opts);
});
</script>
<!-- InstanceEndEditable -->
<link href="p7dmm/p7DMM03.css" rel="stylesheet" type="text/css" media="all">
<link href="p7affinity/p7affinity-3.css" rel="stylesheet" type="text/css" media="all">
<link href="http://fonts.googleapis.com/css?family=Cuprum" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Droid+Sans" rel="stylesheet" type="text/css">
<style type="text/css">
body,td,th {
font-family: Tahoma, Geneva, sans-serif;
font-size: 14px;
}
a:link {
color: #4F81BD;
}
a:visited {
color: #4F81BD;
}
a:hover {
color: #D71C0B;
}
a:active {
color: #D71C0B;
}
.myButton {
-moz-box-shadow:inset 0px 1px 0px 0px #54a3f7;
-webkit-box-shadow:inset 0px 1px 0px 0px #54a3f7;
box-shadow:inset 0px 1px 0px 0px #54a3f7;
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #007dc1), color-stop(1, #0061a7));
background:-moz-linear-gradient(top, #007dc1 5%, #0061a7 100%);
background:-webkit-linear-gradient(top, #007dc1 5%, #0061a7 100%);
background:-o-linear-gradient(top, #007dc1 5%, #0061a7 100%);
background:-ms-linear-gradient(top, #007dc1 5%, #0061a7 100%);
background:linear-gradient(to bottom, #007dc1 5%, #0061a7 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#007dc1', endColorstr='#0061a7',GradientType=0);
background-color:#007dc1;
-moz-border-radius:3px;
-webkit-border-radius:3px;
border-radius:3px;
border:1px solid #124d77;
display:inline-block;
cursor:pointer;
color:#ffffff;
font-family:Arial;
font-size:13px;
padding:6px 24px;
text-decoration:none;
text-shadow:0px 1px 0px #154682;
}
.myButton:hover {
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #0061a7), color-stop(1, #007dc1));
background:-moz-linear-gradient(top, #0061a7 5%, #007dc1 100%);
background:-webkit-linear-gradient(top, #0061a7 5%, #007dc1 100%);
background:-o-linear-gradient(top, #0061a7 5%, #007dc1 100%);
background:-ms-linear-gradient(top, #0061a7 5%, #007dc1 100%);
background:linear-gradient(to bottom, #0061a7 5%, #007dc1 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0061a7', endColorstr='#007dc1',GradientType=0);
background-color:#0061a7;
}
.myButton:active {
position:relative;
top:1px;
}
.formButton.ResultsPageButton.EditButton {
background-repeat: no-repeat;
background-position: center center;
cursor: pointer;
width: 29px;
height: 29px;
background-image: url(../images/Icons/edit.png);
}
.formButton.ResultsPageButton.ViewButton {
background-repeat: no-repeat;
background-position: center center;
cursor: pointer;
width: 29px;
height: 29px;
background-image: url(../images/Icons/view_details.png);
}
</style>
<script type="text/javascript" src="p7dmm/p7DMMscripts.js"></script>
<!--[if lte IE 7]>
<style>
body {min-width: 1020px;}
.affinity-row {zoom: 1;}
#layout {width: 980px;}
</style>
<![endif]-->
<!-- InstanceBeginEditable name="head" -->
<link href="../p7ccm/p7ccm04.css" rel="stylesheet" type="text/css" media="all">
<link href="../p7ccm/p7ccm-responsive.css" rel="stylesheet" type="text/css" media="all">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
<link rel="stylesheet" href="../webassist/jq_validation/Spacious.css">
<link href="../webassist/forms/fd_basic_sjs.css" rel="stylesheet" type="text/css">
<script src="../webassist/progress_bar/jquery-blockui-formprocessing.js" type="text/javascript"></script>
<link href="../webassist/forms/fd_basic_default.css" rel="stylesheet" type="text/css">
<!-- InstanceEndEditable -->
<!--[if lte IE 7]>
<link href="/p7ie_fixes/p7ccm_ie.css" rel="stylesheet" type="text/css" media="all" />
<![endif]-->
</head>

<body>
<div id="logo"><img class="scalable" src="../images/sitetitle.png" alt=""/></div>
<div id="layout">
<div id="masthead">
<div id="p7DMM_1" class="p7DMM03 p7DMM p7dmm-left responsive dmm03-pop">
<div id="p7DMMtb_1" class="p7DMM-toolbar closed"><a href="#" title="Hide/Show Menu"><img src="p7dmm/img/toggle-icon.png" alt="Toggle Menu"></a></div>
<ul id="p7DMMu_1" class="p7DMM03-menu closed">
<li><a id="p7DMMt1_1" href="#">Admin Home</a></li>
<li><a id="p7DMMt1_2" href="#">Transactions</a></li>
<li><a id="p7DMMt1_3" href="#">Recipients</a></li>
<li><a id="p7DMMt1_4" href="#">Download CSV</a></li>
<li><a id="p7DMMt1_5" href="users_results.php">Accounts/Users</a></li>
<li><a id="p7DMMt1_6" href="#">Issuance</a></li>
<li><a id="p7DMMt1_7" href="#">Settings</a></li>
<li><a id="p7DMMt1_8" href="logout.php">Log Out</a></li>
</ul>
<script type="text/javascript">P7_opDMM('p7DMM_1',3,320,0,1,1,1,0,0,1);</script>
</div>
</div>

<div id="banner"><img src="art/art-room.jpg" alt="" class="scalable"></div>
<div class="affinity-row">
<div class="column-content">

<div id="p7CCM_1" class="p7CCM04 p7ccm04-fixed-800">
<div class="p7ccm04-content-row p7ccm04-trans p7ccm-row">
<div class="p7ccm04-1col-column1 p7ccm-col">
<div class="p7ccm04-1col-column1-cnt p7ccm04-content">
<!-- InstanceBeginEditable name="body" -->
<div id="SimpleRegistration_Basic_Default_ProgressWrapper">
<form class="Basic_Default" id="SimpleRegistration_Basic_Default" name="SimpleRegistration_Basic_Default" method="post" action="">
<!--
WebAssist CSS Form Builder - Form v1
CC: Registration
CP: Simple Registrationhtm
TC: Basic
TP: Default
-->
<ul class="Basic_Default">
<li>
<fieldset class="Basic_Default" id="Registration">
<legend class="groupHeader">Registration</legend>
<ul class="formList">
<li class="formItem"> <span class="fieldsetDescription"> Required * </span></li>
<li class="formItem">
<div class="formGroup">
<div class="lineGroup">
<div class="fullColumnGroup">
<label for="acct_number" class="sublabel" > Acct. Number:<span class="requiredIndicator">&nbsp;*</span></label>
<input id="acct_number" name="acct_number" type="text" value="<?php echo((isset($_POST["acct_number"]))?$_POST["acct_number"]:"") ?>" class="formTextfield_Medium" tabindex="1" title="Please enter a value" required>
</div>
</div>
<div class="lineGroup">
<div class="fullColumnGroup">
<label for="referrer" class="sublabel" > Referrer:</label>
<input id="referrer" name="referrer" type="text" value="<?php echo((isset($_POST["referrer"]))?$_POST["referrer"]:"") ?>" class="formTextfield_Medium" tabindex="2" title="Please enter a value">
</div>
</div>
<div class="lineGroup">
<div class="fullColumnGroup">
<label for="user_name" class="sublabel" > User Name:<span class="requiredIndicator">&nbsp;*</span></label>
<input id="user_name" name="user_name" type="text" value="<?php echo((isset($_POST["user_name"]))?$_POST["user_name"]:"") ?>" class="formTextfield_Medium" tabindex="3" title="Please enter a value" required>
</div>
</div>
<div class="lineGroup">
<div class="fullColumnGroup">
<label for="Email_Address" class="sublabel" > Email address:<span class="requiredIndicator">&nbsp;*</span></label>
<input id="Email_Address" name="Email_Address" type="email" value="<?php echo((isset($_POST["Email_Address"]))?$_POST["Email_Address"]:"") ?>" class="formTextfield_Large" tabindex="4" pattern="[^@]+@[^@]+\.[a-zA-Z]{2,6}" title="Please enter a full email address." required>
</div>
</div>
<div class="lineGroup">
<div class="fullColumnGroup">
<label for="password" class="sublabel" > Password:<span class="requiredIndicator">&nbsp;*</span></label>
<input id="password" name="password" type="password" value="" class="formPasswordfield_Large" tabindex="5" title="Please enter a password." required>
</div>
</div>
<div class="lineGroup">
<div class="fullColumnGroup">
<label for="password_confirm" class="sublabel" > Confirm Password:<span class="requiredIndicator">&nbsp;*</span></label>
<input id="password_confirm" name="password_confirm" type="password" value="" class="formPasswordfield_Large" tabindex="6" title="A value is required." confirm="Password" required>
</div>
</div>
</div>
</li>
<li class="formItem"> <span class="buttonFieldGroup" >
<input class="formButton" name="submit" type="submit" id="submit" value="Register" tabindex="7">
</span> </li>
</ul>
</fieldset>
</li>
</ul>
</form>
</div>
<div id="SimpleRegistration_Basic_Default_ProgressMessageWrapper" class="blockUIOverlay" style="display:none;">
<script type="text/javascript">
WADFP_SetProgressToForm('SimpleRegistration_Basic_Default', 'SimpleRegistration_Basic_Default_ProgressMessageWrapper', WADFP_Theme_Options['BigSpin:Slate']);
</script>
<div id="SimpleRegistration_Basic_Default_ProgressMessage" >
<p style="margin:10px; padding:5px;" ><img src="../webassist/progress_bar/images/slate-largespin.gif" alt="" title="" style="vertical-align:middle;" />&nbsp;&nbsp;Please wait</p>
</div>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
</div>
</div>




</div>
</div>
<div class="affinity-row footer">
<div class="column-fourth">
<div class="column-content">
<ul>
<li><a href="javascript:;">Footer Link Number One</a></li>
<li><a href="javascript:;">Footer Link Number Extended Width Two</a></li>
</ul>
</div>
</div>
<div class="column-fourth">
<div class="column-content">
<ul>
<li><a href="javascript:;">Footer Link Number One</a></li>
<li><a href="javascript:;">Footer Link Number Extended Width Two</a></li>
<li><a href="javascript:;">Footer Link Number Three</a></li>
</ul>
</div>
</div>
<div class="column-fourth">
<div class="column-content">
<ul>
<li><a href="javascript:;">Footer Link Number One</a></li>
<li><a href="javascript:;">Footer Link Number Two</a></li>
<li><a href="javascript:;">Footer Link Number Extended Width Three</a></li>
</ul>
</div>
</div>
<div class="column-fourth">
<div class="column-content">
<ul>
<li><a href="javascript:;">Footer Link Number One</a></li>
<li><a href="javascript:;">Footer Link Number Extended Width Two</a></li>
</ul>
</div>
</div>
<p class="copyright">&copy;2019 Your Company. All Rights Reserved.</p>
</div>
</div>
</body>
<!-- InstanceEnd --></html>

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