From the HTML form you need to get the data, from this construction:
<select class="dropdown-toggle user_role" name="user_role" form="idForm" method="post"> {{range $type := .cook.TypeCook }} <option>{{$type}}</option> {{end}} </select> In the Go code, I don’t understand how to get the data:
r.POST("/main/:type/", func(c *gin.Context) { var st string if c.Bind(st) == nil{ println(st) } })