diff options
Diffstat (limited to 'GradeBook.tcl')
-rwxr-xr-x | GradeBook.tcl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/GradeBook.tcl b/GradeBook.tcl index a0a067f..aa6b112 100755 --- a/GradeBook.tcl +++ b/GradeBook.tcl @@ -59,6 +59,15 @@ proc CreatePasswordsTable {db} { db eval $eval_str } +proc AddUserNonWeb { first_name last_name user_name password_hash {group_name {guest}} } { + set eval_str [concat INSERT INTO GradesTable (FirstName, LastName, UserName, PassWordHash, GroupName) VALUES('$first_name', '$last_name', '$user_name', '$password_hash', '$group_name')] + set err [catch {db eval $eval_str } errStat] + if { $err } { + htmlErrorMsg $errStat + dbg "the following error happen: $errStat" 3 + } +} + proc CreateGradesTable {db} { db eval {CREATE TABLE GradesTable(FirstName text, LastName text, UserName text, HW01 real)} |