dongzhenshen7435 2011-06-30 10:24
浏览 37

单击提交后询问密码

I have created a form for use by students at work and the idea is that they complete the form based on a procedure they have completed. The form is then checked by a tutor and they tutors adds his/her comments before submitting the information to a database.

How can I set the form up to ask for a password, when the submit button i clicked? As I don't want students to login in and complete the form and just submit click before the tutor looks at it to check the information they have entered is correct.

Is this possible?

UPDATE: The form is all on one page and I want the students to complete the first few fields then the staff member to complete the rest. But when they click "update database" I want the form to ask for a staff password Here is a picture http://www.flickr.com/photos/mattcripps/5887541880/

  • 写回答

3条回答 默认 最新

  • doujian7132 2011-06-30 10:28
    关注

    What you are asking there involves using SESSIONS to pass the students data from the form page to the next. An alternative would be to include the password on the form the students complete rather than sending them to a new page to just enter a password.

    However, if you do want it on a separate page you can either take a look at jQuery's dialog boxes so once submit is pressed a dialog box is presented to enter a password, or simply pass the form $_POST data to a session and process the password on a separate page.

    Update

    From your comment below as I understand you are looking for something similar to this:

    1) Student logs in
    2) Student completes part 1 of form and submits
    3) Teacher/Admin logs in and selects students form and completes part 2.
    4) Teacher submits finalised form with part 1 and 2 complete.

    For this I would suggest the following database schema:

    studentsTbl  
      student_id  |  int(11)
      password    |  varchar(128)
      pass_salt   |  varchar(64)
      ... (etc)
    
    teachersTbl
      teacher_id  |  int(11)
      password    |  varchar(128)
      pass_salt   |  varchar(64)
      ... (etc)
    
    studentFormTbl
      form_id     |  int(11)
      question1   |  text
      ... (etc)  
    
    completedFormTbl
      form_id     |  int(11)
      question1   |  text
      admin1      |  text
      admin2      |  text
      ... (etc)
    

    The user then logs in using the details from the studentsTbl, submits the form as required which is then stored in the studentFormTbl for review by the teacher/admin. The admin then selects the form to review, change anything as required / add notes and finally submits it to completed forms.

    Obviously you need to mould this to as you want it, changing question1 to more descriptive fields etc.

    评论

报告相同问题?

悬赏问题

  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。