Fabio Gameleira
Fabio Gameleira

Reputation: 19

How to receive php array post parameters in asp?

I have a form that I send a select attribute name="submitted[new_fieldset][c01_mes]" by POST in PHP and need to receive this using ASP request.form.

PHP Code:

<select id="field-c01-mes" name="submitted[new_fieldset][c01_mes]">

    <option value="1" selected="selected">Janeiro</option>
    <option value="2">Fevereiro</option>
    <option value="3">Março</option>
    <option value="4">Abril</option>

</select>

How to receive this array submitted[new_fieldset][c01_mes] in ASP request.form?

I try it, but:

c01_mes = request.form("['submitted']['new_fieldset']['c01_ano']") 

Upvotes: 0

Views: 205

Answers (1)

Fenton
Fenton

Reputation: 251172

Step One (and how you solve this kind of problem) is to see what you have in the Request:

For Each sItem In Request.Form
    Response.Write(sItem)
Next

This will show you all of the keys... and you can then see what the exact key is. It should (probably) be...

Request.Form("submitted[new_fieldset][c01_mes]")

Upvotes: 1

Related Questions