Form data not passing to PHP

前端 未结 4 1617
梦毁少年i
梦毁少年i 2021-01-07 04:14

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

相关标签:
4条回答
  • 2021-01-07 04:37

    use

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

    you have not used name attribute

    0 讨论(0)
  • 2021-01-07 04:45

    You need to have a 'name' attribute in the form for each input field that you want to read in PHP. So you're code should read:

    <form action="php/setlist.php" method="post"> 
    <input type="text" id="SetListName" name="SetListName"/>
    <input type="hidden" id="newList" name="newList" value="" readonly="readonly" style="border: none;">
    <input type="submit" style="width:150px;"><br /><br />
    
    0 讨论(0)
  • 2021-01-07 04:47

    Replace

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

    with

    <input type="text" id="SetListName" name ="SetListName"/>
    
    0 讨论(0)
  • 2021-01-07 04:53

    You are missing name attribute in:

    <input type="text" id="SetListName" />
    
    0 讨论(0)
提交回复
热议问题