|
home—lects—hws
D2L—breeze (snow day)
Due 2015-Apr-20 (Mon) 10:00
We will augment the trivia-question page so that it requires a login, to submit a question. See the example of sessions in lect29-sessions—sessions: chapter 9 (and the working code at page0.php).
(5pts)
Add a
<ins>clarification</ins>: That is: on a first-visit, the user will fill in the form and (presumably) the password. If they do provide the correct password, then they are logged in for 60sec. If they submit 5 more trivia-questions (very quickly — within 60s), then they won't need need to re-provide the password.When logged in, the page should say “Hello userName.” in the upper-right corner, and “not logged in” otherwise. (In particular, don't do any auto-forwarding, as is in the lecture-examples.)
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 clientserver-side… though
presumably it would if the client-side validation passed for submittal).
If a user returns to the form-entry within 3060sec, 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). (Note that this approach works particularly well if you also complete the extra-credit sticky-form, ../hw06b-ec-sticky.)
home—lects—hws
D2L—breeze (snow day)
©2014, Ian Barland, Radford University Last modified 2015.Apr.19 (Sun) |
Please mail any suggestions (incl. typos, broken links) to ibarlandradford.edu |