post方式提交数据

//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" }

原文地址:https://www.cnblogs.com/ymy124/p/4081228.html