Search code examples
phphtmlpostxampp

Issue in posting the php file


I'm trying to insert data that is collected through html form and just show that data after submitting is added successfully but the problem is when ever I click submit button, the php file that I linked it with the action form is shown instead of saying data is added successfully.

Here's the error:

enter image description here

html code of this:

https://gist.github.com/Sarathchandra1202/72c1c26d70b4d24aa65f64858ec84f9c

php code of this : https://gist.github.com/Sarathchandra1202/590e46fd9ed9983929c9ba1bc38fac94

please can you tell me where im going wrong

My database:

enter image description here

My folder which contains all the files:

its located in : "C:\Users\sunny\Desktop\vvmatrimony"


Solution

  • Open the form using the following URL:

    http://localhost/vvmatrimony/<your_file.html>

    Ideally this should work.