Skip to content

Instantly share code, notes, and snippets.

@nitinthewiz
nitinthewiz / login
Created October 28, 2012 09:33 — forked from forrestfrazier/login
log in to web app and return data to be saved in titanium app
//var win = Titanium.UI.currentWindow;
var currentWin = Ti.UI.currentWindow;
// if successful login - save user data to database
function insertRows(dbData) {
// call the database and table
var db = Ti.Database.install('../myapp.sqlite','users');
// call out the info to save then save it
var theData = db.execute('INSERT INTO users (username, email) VALUES("'+name.value+'","'+email.value+'")');