Html / Php form not adding to SQL database

后端 未结 2 1375
南笙
南笙 2021-01-25 17:52

I\'ve been working on this for hours now and including rebuilding my whole code I cannot figure out what is wrong. The HTML form is supposed to populate the patients SQL databas

相关标签:
2条回答
  • As answered on your duplicate post (also answering here for completeness), you're checking for a "doa" field in your if statement, which doesn't exist. Your form defines "dob" twice: once for Date of Birth, and once for Date of Admission:

    <label for="dob">Date of Birth:</label>
    <input type="text" name="dob">
    
    ...
    
    <label for="doa">Date of Admission:</label>
    <input type="text" name="dob">
    
    0 讨论(0)
  • 2021-01-25 18:04

    I am not completely sure about this being the safest way but instead of using MSQLI PDO why don't you try simple mysqli_query($conn,$sql);

    0 讨论(0)
提交回复
热议问题