Skip to content

omahacodeschool/101-query-param-exercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

101-query-param-exercises

Exercises:

1. Open Sesame

A: A user enters a password as a query parameter in the URL like so localhost:8080/index.php?password=whatever. If the password is correct, the user can see the contents of index.php. If it is incorrect, they see an error message telling them they put in the wrong password.

B: A user enters a password into a form, and when they click submit, they are either shown the contents of the web page or an error message, depending if they entered the correct password.


2. Custom greeting

A: A user enters their name as a query parameter in the URL. If their name is a special name of your choosing, they are greeted with a special message. If not, they just get a regular greeting.

B: A user enters their name into a form input field and clicks submit. If their name is a special name of your choosing, they are greeted with a special message. If not, they just get a regular greeting.

3. Calculator

A: On this site, a user will enter two numbers and a mathematical operator as separate query parameters in the URL. They will then see a message with the result of their math operation.

B: On this site, a user will enter two numbers into separate form fields, select a mathematical operator, and hit submit. They will then see the result of their math operation on the same page.

form

result

4.Theme Switcher

Build a site that has a link that when clicked, Changes the color-scheme from:

blue site

To:

red site

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published