RU beehive logo ITEC dept promo banner
ITEC 325
2014fall
ibarland

homelectshws
D2Lbreeze (snow day)

sessions
sessions

Due 2014-Nov-13 (Thu) 23:59

We will augment the skill-form page so that it requires a login, to submit a skill. See the example of sessions in lect29-sessions—sessions: chapter 9 (and the working code at page0.php).

(5pts) Add a <input type="password"/> to the form. For now, a login is “valid” is the password is “skillz”. A user will stay logged in for 30seconds, or until they log out (via a logout link). When logged in, the page should say “Hello userName.” in the upper-right corner, and “not logged in” otherwise.

You have latitude about how to do this, but to minimize your work I was thinking:
the password-field would be on the main form and submitted alongside all other information; if the password is correct then they are logged in (regardless if the form validates client-side… though presumably it would if the client-side validation passed for submittal.) If a user returns to the form-entry within 30sec, they'll see a greeting for their name in the upper-right (e.g. “Hello ventra99”).

(20pts) If a user submits a form and they are not logged in, (or if a different username was entered w/o a password, than the currently-logged-in user) it should count as a server-side validation error (and be printed as such), leaving them on the page with the (sticky) form.

homelectshws
D2Lbreeze (snow day)


©2014, Ian Barland, Radford University
Last modified 2014.Nov.13 (Thu)
Please mail any suggestions
(incl. typos, broken links)
to ibarlandradford.edu
Rendered by Racket.