עמוד:218

connectDB (); String name = request . getParameter ( "userName" ); { if ( request . getParameter ( "send" ) ! = null ) boolean userFound = false ; < % } userFound = true ; if ( rs ! = null && rs . next ()) { rs = statement . executeQuery ( queryString ); try { queryString = "SELECT * FROM tblUsers WHERE userName = '" + name + "' " ; שמירת פרטי המשתמש session . setAttribute ( "gender" , rs . getString ( "gender" ) ); session . setAttribute ( "address" , rs . getString ( "address" ) ); session . setAttribute ( "lastName" , rs . getString ( "lastName" ) ); session . setAttribute ( "firstName" , rs . getString ( "firstName" ) ); session . setAttribute ( "userName" , rs . getString ( "userName" ) ); if ( userFound ) { // session . setAttribute ( "email" , rs . getString ( "email" ) ); session . setAttribute ( "cellPhone" , rs . getString ( "cellPhone" ) ); session . setAttribute ( "phone" , rs . getString ( "phone" ) ); session . setAttribute ( "birthYear" , rs . getString ( "birthYear" ) ); הפניה לדף לביצוע העדכון // response . sendRedirect ( "doUpdate . jsp" ); } System . out . println ( "error in connecting" ); catch ( Exception ex ) { } } out . print ( "user not found" ) ; else { } % > }

מטח : המרכז לטכנולוגיה חינוכית


לצפייה מיטבית ורציפה בכותר