CURL 和下拉数组

发布于 2024-12-07 07:09:13 字数 1744 浏览 0 评论 0原文

我正在尝试通过 POST 提交表单,但是该网站有区域和城市下拉列表,下拉列表的构造如下

每个区域都有 ar 下拉列表,但它们是隐藏的,因此大多数都是region_id =>; '',但是我的帖子和他们的帖子是相同的,但它仍然说请选择一个城市,

他们的帖子

Array
(
    [region] => MY04
    [district] => Array
        (
            [MY14] => 
            [MY10] => 
            [MY07] => 
            [MY01] => 
            [MY02] => 
            [MY03] => 
            [MY04] => ML001
            [MY05] => 
            [MY06] => 
            [MY08] => 
            [MY09] => 
            [MY11] => 
            [MY12] => 
            [MY13] => 
            [MY15] => 
            [MY16] => 
            [MY99] => 
        )

    [streetnumber] => 
    [streetname] => 
    [streetname2] => 
    [postcode] => 
    [longitude] => 
    [latitude] => 
    [submit] => Next >
    [hidden_listing_id] => 
    [process] => 4e870291af244
)

我的阵列

    Array
(
    [region] => MY04
    [district] => Array
        (
            [MY14] => 
            [MY01] => 
            [MY02] => 
            [MY03] => 
            [MY04] => ML001
            [MY05] => 
            [MY06] => 
            [MY07] => 
            [MY08] => 
            [MY09] => 
            [MY16] => 
            [MY12] => 
            [MY13] => 
            [MY10] => 
            [MY11] => 
        )

    [streetnumber] => 
    [streetname] => 
    [streetname2] => 
    [postcode] => 
    [longitude] => 
    [latitude] => 
    [submit] => Next >
    [hidden_listing_id] => 
    [process] => 4e87114ddef0e
)

已经卡在这个问题上一段时间了,有人知道为什么会发生这种情况吗?谢谢你!

I'm trying to submit a form via POST, however the website has regionand city dropdown, the dropdown is constructed like this

There ar dropdowns for each region, but their hidden so most of them are region_id => '', however my post and their post are identical, yet it still says please select a city,

Their POST

Array
(
    [region] => MY04
    [district] => Array
        (
            [MY14] => 
            [MY10] => 
            [MY07] => 
            [MY01] => 
            [MY02] => 
            [MY03] => 
            [MY04] => ML001
            [MY05] => 
            [MY06] => 
            [MY08] => 
            [MY09] => 
            [MY11] => 
            [MY12] => 
            [MY13] => 
            [MY15] => 
            [MY16] => 
            [MY99] => 
        )

    [streetnumber] => 
    [streetname] => 
    [streetname2] => 
    [postcode] => 
    [longitude] => 
    [latitude] => 
    [submit] => Next >
    [hidden_listing_id] => 
    [process] => 4e870291af244
)

My array

    Array
(
    [region] => MY04
    [district] => Array
        (
            [MY14] => 
            [MY01] => 
            [MY02] => 
            [MY03] => 
            [MY04] => ML001
            [MY05] => 
            [MY06] => 
            [MY07] => 
            [MY08] => 
            [MY09] => 
            [MY16] => 
            [MY12] => 
            [MY13] => 
            [MY10] => 
            [MY11] => 
        )

    [streetnumber] => 
    [streetname] => 
    [streetname2] => 
    [postcode] => 
    [longitude] => 
    [latitude] => 
    [submit] => Next >
    [hidden_listing_id] => 
    [process] => 4e87114ddef0e
)

Been stuck on this for a while, anyone have any ideas why this is happening? Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

嘿咻 2024-12-14 07:09:13

通过执行 [district][state] = value 来解决,对于每个 $post["district[".$st."]"] = $city;

Solved by doing [district][state] = value, for each one $post["district[".$st."]"] = $city;

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文