s2
This commit is contained in:
@@ -3,7 +3,7 @@ export default function handler(req, res) {
|
||||
|
||||
console.log(req.body)
|
||||
// Open a new database connection
|
||||
let uname, status, type, start_month, start_date, end_date, plan, klas, lang, phone, pass, anual, early_start_programme, toddlers, interakto, email, country, state, city, address, school="";
|
||||
let uname, status, type, start_month, start_date, end_date, plan, klas, lang, phone, pass, annual, early_start_programme, toddlers, interakto, email, country, state, city, address, school="";
|
||||
|
||||
if(req.body.uname) uname =req.body.uname;
|
||||
if(req.body.status) status =req.body.status;
|
||||
@@ -15,10 +15,9 @@ export default function handler(req, res) {
|
||||
if(req.body.plan) plan =req.body.plan;
|
||||
if(req.body.klas) klas =req.body.klas;
|
||||
if(req.body.lang) lang =req.body.lang;
|
||||
if(req.body.lang) lang =req.body.lang;
|
||||
if(req.body.phone) phone =req.body.phone;
|
||||
if(req.body.pass) pass =req.body.pass;
|
||||
if(req.body.anual) anual =req.body.anual;
|
||||
if(req.body.annual) annual =req.body.annual;
|
||||
if(req.body.early_start_programme) early_start_programme =req.body.early_start_programme;
|
||||
if(req.body.toddlers) toddlers =req.body.toddlers;
|
||||
if(req.body.interakto) interakto =req.body.interakto;
|
||||
@@ -29,7 +28,7 @@ export default function handler(req, res) {
|
||||
if(req.body.address) address =req.body.address;
|
||||
if(req.body.school) school =req.body.school;
|
||||
const db = new sqlite3.Database('data/appUser.db');
|
||||
db.run(`INSERT INTO user (uname, status, type, start_month, start_date, end_date, plan, klas, lang, phone, pass, anual, early_start_programme, toddlers, interakto, email, country, state, city, address, school ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`, [ uname, status, type, start_month, start_date, end_date, plan, klas, lang, phone, pass, anual, early_start_programme, toddlers, interakto, email, country, state, city, address, school],
|
||||
db.run(`INSERT INTO user (uname, status, type, start_month, start_date, end_date, plan, klas, lang, phone, pass, annual, early_start_programme, toddlers, interakto, email, country, state, city, address, school ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`, [ uname, status, type, start_month, start_date, end_date, plan, klas, lang, phone, pass, annual, early_start_programme, toddlers, interakto, email, country, state, city, address, school],
|
||||
function(err) {
|
||||
if (err) {
|
||||
return console.log(err.message);
|
||||
|
||||
Reference in New Issue
Block a user