Click here to Skip to main content
14,872,753 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:

I have a login form on the HTML returned by my server and for testing purposes, 2 text files containing a valid username and password in the same folder as my server. Can you please explain to me how to send a request when the login button is pressed to the server, and how the server will interpret and validate the details and send either a logged in screen or an incorrect details message?

Updated 4-May-14 8:11am
Kornfeld Eliyahu Peter 4-May-14 12:06pm
Did you heard about Google? He's your friend!
[no name] 4-May-14 12:08pm
I tried that but my situation's different
Kornfeld Eliyahu Peter 4-May-14 12:11pm
So let us see your situation - your question tells nothing about your special code...
[no name] 4-May-14 14:13pm
i have a server for a start and i dont know how to use the code ive got to interact with the client
[no name] 4-May-14 12:07pm
I forgot to mention that my server was written in VB.NET
[no name] 4-May-14 12:18pm
I am curious to know how you would think that we could explain to you how the web server you wrote works or how it is supposed to work. Your server would interpret and validate the details in the exact same way as you are doing every other GET and POST.
[no name] 4-May-14 12:24pm
But that's the thing, all my server does is send htmls when ther clicks different links. I don't know how to use GET/POST commands, but I know I need them.
GET/POST commands uses the client, not server. Server sees which command is that (it's called "method") by looking at HTTP headers.
Perhaps you need to get a basic idea first:
[no name] 4-May-14 17:08pm
thanks very much, i didnt know it was in the headers but i do know how to view the headers fortunately. so if my html is called login.html and the form action is login.html, would my server receive a new request containing the details? and how would it send back a response? currently the context type is text/html so would i just send "yes" or "no" back to the client? if so, how would they use that information? i did read through the wiki page and it helped me get better knowledge, but i'm still stuck on this. is it correct to keep the context type as text/html throughout and just write to the client the relevant information, eg. an image? i don't know if the client sends separate GET requests for each image or not. but it will make sense if it does!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900