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
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">
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);