need to run php script when form is submitted
- by Brad
I have a form that needs to run a php script once the submit button is clicked, it needs to be ajax.
<form method="post" action="index.php" id="entryform" name="entryform">
<input type="submit" name="submit" value="Submit" onclick="JavaScript:xmlhttpPost('/web/ee_web/include/email-notification.php', 'entryform')" />
</form>
In this situation, using if(form posted) { get results and run script } is not an option, I need to run the script externally, that is why I need it to execute the email-notification.php at onclick
When I point my web browser to domain.com/include/email-notification.php - it runs perfectly.
Any help is appreciated.