我必须通过“表单发布”发布一个值并将其插入表中,这是我在两个文件中的代码:
<html>
<body>
<table>
<form enctype="multipart/form-data" action="<?php $_SERVER["DOCUMENT_ROOT"] ?> /contents/ad_posting_process_4.php" method="post">
<?php $cat_no = "101010"; ?>
<input type=hidden id="category" value=" <?php echo $cat_no; ?> ">
<tr> <td>Sub Category: </td><td> <input type=text id="sub_category" > </td>
<tr><td></td> <td><input type="submit" name="action" value="Post"></td></tr></tr>
</form>
</body></html>
这里是 ad_posting_4.php
<?php session_start();
include($_SERVER["DOCUMENT_ROOT"]."/includes/conn.php");
$category = mysql_real_escape_string($_POST['category']);
$sub_category = mysql_real_escape_string($_POST['sub_category']);
echo "category=". $category;
echo "sub_category=". $sub_category; ?>
没有通过邮寄发送的价值。
我哪里错了?
问候: