General discussion

Locked

Forms and processing

By davoud ·
O.K...I am gonna start working on an online registration form which will include a user name, password and other information as well as a code that the user will have to enter it in the appropriate box (this is because of preventing registrations by a software). The code will be different each time a user visit the registration page.

I know how to make a form, but I have the following questions:


1-I would like to know how I can add that code to my html.

2-In general how the form will be processed and what I should add to my html to process the form.( I guess I have to add a CGI script but how and where in html or serverside maybe? )

3-If for example one of the boxes has left blank, user name and/or password are not correct, how the form will handle it? Will Javascript take care of it? if yes, Is there any sample javascript?

4-what is the best online source of learning the whole this procedure?

5- Is there anything on the server side too which needs to be there to process the whole thing or it is all client side (html)?

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

A couple of points

by Tony Hopkinson In reply to Forms and processing

Javascript validation. Boxes filled, numbers not lettered, etc is often cited for efficiency. But every validation you do on the client you should do on the server as well anyway. So it would only be worth it if there is a large amount to validate of your site is slow.

As for resources, google will find you masses and they will include several different flavours of what you are trying to achieve.

Yes you do need server side stuff
The technology choices available are fairly broad.
From the sound of it scripting is probably going to be your choice, so that would be PHP on a linux box or ASP on an MS one by almost default.
There are others including estoric stuff like ISAPI on windows or writing CGI executables on either.
The key is to collect Username and password on a HTML form. Pass them to a server using HTTPS. Validate them there and allow entry to further functionality or block.
Because HTTP is stateless, the fact that you are logged in has to be passed to the server with every request for another page, so once logged in you must stick with HTTPS or the loginID or whatever you use could be captured by a black hat and used in lieu of actually logging in.

Happy coding, completing this exercise you will learn a lot.

Collapse -

technology choices

by ip_fresh In reply to A couple of points

As for resources, google will find you masses and they will include several different flavours of what you are trying to achieve.

Yes you do need server side stuff
The technology choices available are fairly broad.
From the sound of it scripting is probably going to be your choice, so that would be PHP on a linux box or ASP on an MS one by almost default.

Davis,
http://www.my-loan-insurance.co.uk/

Collapse -

by davoud In reply to technology choices

Thanks alot for your messages. Tony I really appreciate your comments. It gave me a good vision of what I am after. In regards to the java script, yes I understand that googling will give alot of resources but the reason I asked it up here is that I was looking for a source from a tech person's view.

What about java script validation tool, like the one for html and css in w3c website? Is there any online tool for that? I know there is a tool in firefox browser but I don't know if that is a reliable one.

thanks

Collapse -

Not the best person to ask that

by Tony Hopkinson In reply to

I have an intense dislike for client side scripting.
Did I misunderstand when you said form validation I assumed you meant checking a form field for data before posting it to the server. To me that's only necessary for slow end to end communications.
If you're only talking user name and password which you are without doubt going to validate for content server side anyway I fail to see the point.

Collapse -

by davoud In reply to Not the best person to as ...

No I did not say form validation. Well as you mentioned forms will be validated on the server side anyways.

I meant online Java script validation tool.

Collapse -

A tool like that is always useful in scripting

by Tony Hopkinson In reply to

Debugging scripts is a monumental PIA. 90% of your mistakes will be getting case or spelling wrong. Finding them by running the page takes ages.

Collapse -

by davoud In reply to A tool like that is alway ...

I am going to like the java script validation tool in Firefox. It seems to be a reliable one.

Back to Web Development Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums