我的php有问题,query.php页面没有收到从表单index.php发送的POST请求

问题描述 投票:0回答:1

我的 php 有问题,query.php 页面没有收到来自表单的 index.php 发送的 POST 请求

查询.php

$data = $_POST;
$type = "cha";
echo var_dump($data);
echo $type;

index.php

    <form action="../query.php" method="POST" id="sendFrom">
    <h1></h1>
    <div class="conteiner post">
        <select name="Type" id="select1" onchange="select1Change()">
            <option value="change">Type</option>
            <?php $query = mysqli_query($link, "select * from transport_type");
            while ($result = mysqli_fetch_assoc($query)) { ?>
                <option value='<?php echo $result['ID'] ?>;<?php echo $result['Type'] ?>'><?php echo $result['Type'] ?></option>
            <?php } ?>
        </select>
        <select name="Type2" id="select2">
            <option value="change" dissabled>Car type</option>
            <?php $query = mysqli_query($link, "select * from transport_type2");
            while ($result = mysqli_fetch_assoc($query)) { ?>
                <option value='<?php echo $result['ID'] ?>;<?php echo $result['Type2'] ?>'><?php echo $result['Type2'] ?></option>
            <?php } ?>
        </select>
        <select name="Brand" id="select3">
            <option value="change">Brand</option>
            <?php $query = mysqli_query($link, "select * from transport_brand");
                while ($result = mysqli_fetch_assoc($query)) { ?>
                    <option value='<?php echo $result['ID'] ?>;<?php echo $result['Brand'] ?>'><?php echo $result['Brand'] ?></option>
                <?php } ?>
        </select>
        <input type="text" name="MinPeriod" id="text1">
        <select name="Unit" id="select4">
            <option value="change">Unit</option>
            <?php $query = mysqli_query($link, "select * from transport_period_unit");
                while ($result = mysqli_fetch_assoc($query)) { ?>
                    <option value='<?php echo $result['ID'] ?>;<?php echo $result['Unit'] ?>'><?php echo $result['Unit'] ?></option>
                <?php } ?>
        </select>
        <input type="text" name="Price" id="text2">
        <input type="text" name="Comment" id="text3">
        <button id="inputSubmit">Create</button>
                </form>

这就是我在 query.php 上得到的

thats what i get

我不知道该怎么办

php html post
1个回答
0
投票

没有可供选择的选项,也没有任何输入字段的值。

© www.soinside.com 2019 - 2024. All rights reserved.