表单数据未传递到PHP

问题描述:

我具有将数据传递到php页面的简单形式.形式是:

I have what should be a simple form to pass data to a php page. The form is:

<form action="php/setlist.php" method="post"> 
<input type="text" id="SetListName" />
<input type="hidden" id="newList" name="newList" value="" readonly="readonly" style="border: none;">
<input type="submit" style="width:150px;"><br /><br />

而php是:

$SetListSave = $_REQUEST['newList'];
$SetListName= $_REQUEST['SetListName'];

echo $SetListName;
echo $SetListSave;

我可以从表单中获取newList,但是没有传递SetListName.我是php的新手,所以我可能在这里缺少一些基本的知识,但是我很困惑.

I am getting the newList from the form just fine but the SetListName isn't getting passed. I am a novice with php so I could be missing something basic here, but I am stumped.

您在以下位置缺少name属性:

You are missing name attribute in:

<input type="text" id="SetListName" />