Insert record
Hello
I used insert record at webassist Mysqli SB. and i did all steps to binding data withe phpmyadmin...
When I click on submit .. the contents of the form are cleared and nothing happens.
the code:
<?php require_once('Connections/rccon.php'); ?>
<?php require_once('webassist/mysqli/rsobj.php'); ?>
<?php require_once('webassist/mysqli/queryobj.php'); ?>
<?php
$register = new WA_MySQLi_RS("register",$rccon,1);
$register->setQuery("SELECT * FROM login");
$register->execute();
?>
<?php
if (isset($_POST["submit"]) || isset($_POST["submit_x"])) {
$InsertQuery = new WA_MySQLi_Query($rccon);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "login";
$InsertQuery->bindColumn("username", "s", "".((isset($_POST["username"]))?$_POST["username"]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("email", "s", "".((isset($_POST["email"]))?$_POST["email"]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("password", "s", "".((isset($_POST["password"]))?$_POST["password"]:"") ."", "WA_DEFAULT");
$InsertQuery->saveInSession("");
$InsertQuery->execute();
$InsertGoTo = "index.php";
if (function_exists("rel2abs")) $InsertGoTo = $InsertGoTo?rel2abs($InsertGoTo,dirname(__FILE__)):"";
$InsertQuery->redirect($InsertGoTo);
}
?>