first_name1=$("#txt_fname_1").val();
last_name1=$("#txt_lname_1").val();
first_name2=$("#txt_fname_2").val();
last_name2=$("#txt_lname_2").val();
mno_1=$("#txt_mno_1").val();
mno_2=$("#txt_mno_2").val();
password=$("#txt_pwd").val();
shop_title=$("#txt_stitle").val();
address=$("#txt_add").val();
rules=$("#txt_rules").val();
var mysql=require('mysql');
var connection=mysql.createConnection({
host : 'localhost',
user : 'root',
password : null,
database : 'moneytransfer'
})
connection.connect();
connection.query('update tbl_my_profile set ?',{first_name_1:first_name1,last_name_1:last_name1,first_name_2:first_name2,last_name_2:last_name2,mno_1:mno_1,mno_2:mno_2,password:password,shop_title:shop_title,address:address,rules:rules}) ;
connection.end();
jesus, you should also really keep your database code outside of your markup
Обсуждают сегодня