Exercise 11.1
This is Exercise #11.1, lecture on communicating with backend, used in the course IDATA2301 Web technologies at NTNU, campus Aalesund.
Purpose
The purpose of the exercise is try out creating an HTML form that submits data to a server.
Instructions
- Create a document with an HTML form.
-
Set the forms method to
POST
and target (the URL of the receiving script) tohttps://web-tek.ninja/php_backend/dummy_login.php
-
Add the following input fields in it:
-
A text input with name
username
and default value "john". - A password input with name
key
. - Add labels for the inputs
- Add a hidden field with a name and value of your choice.
-
A text input with name
- Add a "Submit form" button.
-
Try to post the form. You should get an HTML page in response
(generated by a dynamic PHP script on the server). Check out what the
page is saying and find what you need to enter in the
key
field to get a "total success" :).
Solution
You can find a solution here.