diff options
author | Vidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com> | 2020-10-21 09:11:15 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com> | 2020-10-21 09:11:15 +0530 |
commit | 699486cbebc104b26fd3bc3d521c47a4827f2909 (patch) | |
tree | 79a0a9f98f0166f23bde4412e4682d25f7aceb31 | |
parent | bb826f1efc7e0c88790acfb8a0a65057f0f2644f (diff) |
-rw-r--r-- | main.go | 4 | ||||
-rw-r--r-- | templates/new.index.html | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -4,7 +4,7 @@ import ( // "log" "net/http" "os" - + "fmt" "github.com/gin-gonic/gin" _ "github.com/heroku/x/hmetrics/onload" ) @@ -37,11 +37,11 @@ func main() { router.GET("/new", func(c *gin.Context) { c.HTML(http.StatusOK, "new.index.html", nil) + name := c.PostFormArray("name") }) router.GET("/site-down", func(c *gin.Context) { c.HTML(http.StatusOK, "maintain.html", nil) }) - router.Run(":" + port) } diff --git a/templates/new.index.html b/templates/new.index.html index d01a1ef..565b80e 100644 --- a/templates/new.index.html +++ b/templates/new.index.html @@ -30,7 +30,7 @@ <div class="rightflex"> <br> <h1>Enter someone's name to send them to <strong>hell</strong>.</h1></span> - <div class="form"> + <div class="form" method="POST"> <input type="text" id="name" name="name"> <button type="button" id="send">Send</button> </div> |