Jump to content

User Registration Form


pratik8613

Recommended Posts

Hello Friends, I want to design a registration form for online test which appears on the online test page link.This form should appear in form of a pop up by shadowing background test page contents with grey colour. When user submits the data, this pop up form should validate the data and send the data to database and then the background test page content should be available for the user. If user cancels the form pop up then background page should show an error.(ie the test page link should be available to those who register themselves through form). Thank you.

Link to comment
Share on other sites

On your link I have to click on "CLICK HERE" to get the form.
Just use the onload event for the body element to show the box.Then it won't be called when clicking the text "CLICK HERE", but it will be called when the page loads.
Link to comment
Share on other sites

Finally I have created the form. But I have got a new problem. After submitting the form, the user redirects to the "contact.asp" page which is the action of the form.On contact.asp page, I have code for sending the form data to server. But I want user to remain on the same page which contains the form even after executing form action="contact.asp". i.e. when user clicks on submit button, the form should send the data to server and the content of the page should be available to the user.

Link to comment
Share on other sites

with some simple if logic, you should be able to make contact.asp the same page as the form. so the form submits to itself, which is contact.asp, have an if statement to check if the form was submitted, process the form submittion. but outside the if statement, you can always have contact.asp output the form.

Link to comment
Share on other sites

with some simple if logic, you should be able to make contact.asp the same page as the form. so the form submits to itself, which is contact.asp, have an if statement to check if the form was submitted, process the form submittion. but outside the if statement, you can always have contact.asp output the form.
Can you provide me the code or any example?
Link to comment
Share on other sites

well, I'm not sure how it goes for ASP, but in PHP, when a user submits a form, you can test for the values in $_POST or $_GET depending on the method dictated in the forms action property. If a submit button is present, you can test for it ahead of time. i.e.*contact.php*

<?phpif(isset($_POST['submit'])){  //form processing here};?><form action="contact.php" method="post">// form stuff in here<input type="submit" name="submit" value="submit"/></form>

there's lots of implementations depending on how you want to do the form processing and form handling, and this example is just off the cuff.

Edited by thescientist
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...