开发者

PHP form not carrying variable to actioned page?

i am trying to create a form to create an html page for craigslist. here is the form

            <html>
            <head>


            </head>
            <body>


            <form action="bodytest.php"  method="post">

            Year
            <input type="text" name = "Year">;
            Make
            <input type="text" name = "Make">;
            Model
            <input type="text" name = "Model">;

            <input type="submit" value="Proceed">

            </form>

            </body>
            </html>

then here is the 开发者_运维百科snippet of code that i want to pull the info

            <tr>
            <?php
            $year = $_POST['Year'];
            ?>
            <td style=" margin:5px; width:100px;">  <?php echo $year ?>  </td> 

for some reason it is not pulling the information to the field, what is going wrong?


There is no case-sensitivity, try naming your input year (since the capital Y is lost) and retrieving the data from $_POST["year"]. There could also be problems with register globals settings (etc), so try a print_r($_POST); to see what's in there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜