Skip to content

Latest commit

 

History

History
17 lines (15 loc) · 597 Bytes

README.md

File metadata and controls

17 lines (15 loc) · 597 Bytes

How to handle form in Go?

  • Handling form in Go.
  • Validating values in form: for better security.
  • Using HTMLEscape to avoid XXS attack.
  • How to avoid submitting the form twice? -> A unique token for each form (e.g., Timestamp encoded with MD5)
  • Upload file with form.

Usage

  • Spin up the server.
$ go run main.go
  • Go to the signup page (http://localhost:9090/signup) and signup.
  • Expected outcome
    • You will see your username, password, and email displayed on the status page.
    • You will see the photo you uploaded on your local server.