表单数据未传递到PHP [英] Form data not passing to PHP

查看:62
本文介绍了表单数据未传递到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" />

这篇关于表单数据未传递到PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆