导航

post方式提交数据

Posted on 2014-11-07 14:13  网名还没想好  阅读(196)  评论(0编辑  收藏  举报

//index.html

<html>
<body>
<form action="testajax.php" method="post">
<input name="sub[name]" value="ymy">
<input name="sub[nu]" value="39">
<input type="submit" value="test">
</form>
</body>
</html>

//testajax.php

<?php
$sub = $_POST['sub'];
var_dump($sub);die();
?>

输出:

array(2) { ["name"]=> string(3) "ymy" ["nu"]=> string(2) "39" }