quick php question

firstnamelastname

Regular Member
Joined
Jun 20, 2015
Messages
410
Reaction score
420
hi guys
i downloaded an html website template
it comes with a php contact script contact.php

in the index.html file, there is no form action = contact.php

but the contact form works and sends the messages.

I cannot figure out how the index.html is connecting to the contact.php script, how does it know it's supposed to send the emails to my email address when there is no contact.php mentioned in the index.html file?
 
hi guys
i downloaded an html website template
it comes with a php contact script contact.php

in the index.html file, there is no form action = contact.php

but the contact form works and sends the messages.

I cannot figure out how the index.html is connecting to the contact.php script, how does it know it's supposed to send the emails to my email address when there is no contact.php mentioned in the index.html file?

The form part of your HTML file, I'd suggest you look at that. As that's the main part of the code which sends request to a specific PHP file, in your case it's the contact.php. It might be sending POST/GET request to contact.php or it is probably using AJAX which loads PHP files real time instead of refreshing the page.
 
Last edited:
Forma can be submitted via JavaScript as well, not necessarily via form action.
I think that's the case here. There is a .js file called contact.js which mentions the contact form's id at the beginning.
 
Back
Top