Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

In html ,when we create a form for username and password,when we click submit button where will the link go.How does it works?

user-image
Question added by Feras Abualrub , Web Solutions Manager , Qistas for Information Technology
Date Posted: 2015/04/19
jean el khoury
by jean el khoury , Full Stack Web Developer , CTServ

The HTML form you created should be linked to a PHP code that executes the action that should be performed.

usually the information entered is also stored in a database using SQL.

 

So in general the HTML is the skeleton of your form, the PHP is the form in action and the SQL Database is where information is stored

geeta sethi
by geeta sethi , faculty , apar india college

<html>

<head> <title> computer </title> </head>

<body> <input type="text"name = username  size =48>Enter the user name

<,br>

<input type = password name = password size =48> Enter the password

<input type = submit name = submit>

,input type = reset name = submit>

</body>

</html>

 

each form have an action, if the action is not specified the form will be submitted to the same oage it was created on.

 

once you specify the action , and submit the form, the username and password will be sent to the receiver action, and thus will be matched against your users database, if a match is found, a session will be created and the user will be logged in, if not match found, an error message would appear with invalid username / password.

 

we use an action attribute in form tag which specifies the path to file which will execute after clicking submit. e.g <form method="post/get" action="path/to/the/file"></form>

Asif Ahmed Shoro
by Asif Ahmed Shoro , Senior Full Stack Developer , Netaq ESolution

when html form is used so this form goes two ways when submit button press .In form tag here is action attributes which shows that where we move so here is syntax <form action="abc" > whatever where you move the page and second is if you remain same page so we write like this <form action="#" >  

Muhammad Ahmed Raza
by Muhammad Ahmed Raza , Web Developer & Technical Support Head , Ninja Softs (Private) Limited

Here is an example coding of form submission in HTML:

 

<!---- 

<form action="action_page.php">

First name:<br>

<input type="text" name="firstname" value="Mickey">

<br>

Last name:<br>

<input type="text" name="lastname" value="Mouse">

<br><br>

<input type="submit" value="Submit">

</form>

--->

 

Where action_page.php is your targeted PHP page.

 

basically  the information entered isstored in a database using SQL. The HTML form you created should be linked to a PHP code that executes the action that should be performed.as HTML is the skeleton of your form, the PHP is the form in action and the SQL Database is where information is stored

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.