473,387 Members | 1,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to create an answer submit button?

1
I want to create an text field then a submit button.

The text field is supposed to be the answer of a question.
If the user types the correct answer and clicks submit, he is taken to the next page. If he types the wrong answer the page refreshes to the current page.
Also if the user knows the url of the next page, while he is on the current page and type it in the url bar, it should be shown that you are not authorised to view this page.(Use of checks, i suppose)

Please help me with use of databases as well.
Sep 5 '10 #1
2 1487
kovik
1,044 Expert 1GB
Post the answer to a page that checks it. You can save the questions and answers in the database and use that data to check. If the answer is right, send them to the next page. If not, send them to the previous one. Save their progress in a session, and use that to check whether they are authorized to access any particular question.
Sep 6 '10 #2
Canabeez
126 100+
You could even post it to the same page, do the answer/session checks on the backend and printout the page.
Sep 9 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Syed Ali | last post by:
Hello, I have 1 HTML form with 4 submit buttons and 10 textfield entry areas. If submit button1 is pressed I need to make sure that all 10 textfield entries have been filled before submitting...
1
by: Stanimir Stamenkov | last post by:
Here's an example: <form action="bogus" method="post"> <p> <a href="prev.cgi"><input type="submit" name="prev" value="< Back"></a> <a href="next.cgi"><input type="submit" name="next"...
2
by: ivanhoe | last post by:
All articles and tutorials I've seen on subject of forms say that if there's name and value for submit button(input tag with type="submit"), they'll get submitted along with the rest of the...
15
by: JR | last post by:
Hi. I hope someone out there who is more versed with JavaScript than I can help me with the following annoying problem. Here's the problem. I have a form with the following layout: Column A...
4
by: Frank Way | last post by:
Hi all, I've googled this one to death, and still can't find an answer. Not sure I'm asking the right question, but here goes: Have a form with an onSubmit that has some javscript to disable...
2
by: Martin Knott | last post by:
Hopefully an easy answer. I've got a form with 1 input field, and a submit button. I register an event for the button, run in debug mode, push the button and sure enough I'm in the event...
11
by: Harvey Waxman | last post by:
How can I disable a submit button for a form if JS is disabled. In other words, JS must be enabled to submit the form. Thanks Harvey -- http://righttax/blog
7
by: Bjorn Sagbakken | last post by:
Hello. There maybe an simple answer to this, but sometimes one get a strange blindness when working intensely on one single problem. I'm using ASP.NET 2003, building pages that include 3 user...
8
by: kj | last post by:
Is there a simple way to decouple the value attribute of a submit button from the text that actually gets displayed on it? In principle, what I'm looking for is something like <input...
7
by: ChristinaTIT | last post by:
Hi, I have a form containing ID Type Quantity Rate values. it should have two submit buttons which, when posted, will do the two different things in two different scripts.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.