[Gambas-user] Webpage & Request.Post

T Lee Davidson t.lee.davidson at gmail.com
Sat Jul 2 21:37:34 CEST 2022


On 7/2/22 09:37, Hans Lehmann wrote:
> The following - extended source text:
> 
> <%
>    Dim i As Integer
>    Dim aFields As New String[]
>    Dim hRequest As New Request
> 
>    aFields = Request.Post.Fields
> 
>    Print "METHODE = " & CGI["REQUEST_METHOD"]
>    Print "<br>"
>    For i = 0 To aFields.Max
>     Print "Field " & i & " = " & aFields[i] & " Field_Value = " & hRequest.Post[aFields[i]] & "<br>"
>    Next
> %>
> 
> triggers an error. The browser only says:
> 
> 500 Internal Server Error
> 
> Where is my error?

Just FYI, the 500 Internal Server Error was likely caused by this line:
Dim hRequest As New Request

The documentation does not explicitly say, but I would have to assume that the Request class is not creatable.


-- 
Lee


More information about the User mailing list