Some easy points on offer…
I wish to action a PHP script from a WordPress page but where is the best place to store the script? The script works perfectly fine using a non-WordPress environment in a flat HTML directory structure.
and I want to action it from the page using the following code:
<form class="contact_form" form action="phpmailersub.php" method="post" enctype="multipart/form-data" name="contact_form" onsubmit="return validateForm()">
What will then go into form action=”file” ?
At current the submit action is searching for a page http://current/route/to/contact-test/phpmailersub.php
but obviously, WordPress cannot find it.
Your help would be very much appreciated! If I can do anything to articulate my query or if you need any additional material I will try my best to help.
UPDATE
At current the PHP file (phpmailersub.php) and class.phpmailer.php sits in: http://damtech.it/demo/etap/wp-content/plugins/phpmailersub.php
and my current code looks like this:
<form class="contact_form" action="<?php bloginfo('http://damtech.it/demo/etap/wp-content/plugins/'); ?><p>/phpmailersub.php" enctype="multipart/form-data" method="post" name="contact_form" onsubmit="return validateForm()">
<table class="contact">
<tbody>
<tr>
<td class="third"><input type="text" name="cf_mercury" required="" /></td>
<td><span style="color: #3c4247;"> Name</span><span style="color: #3492d1;">*</span></td>
</tr>
<tr>
<td class="third"><input type="email" name="cf_jupiter" required="" />
<span class="form_hint">Correct format "name@url.com"</span></td>
<td> <span style="color: #3c4247;">E-mail</span><span style="color: #3492d1;">*</span></td>
</tr>
<tr>
<td colspan="2"><textarea name="cf_uranus" required="" rows="6"></textarea></td>
</tr>
</tbody>
</table>
<table class="contact">
<tbody>
<tr>
<td width="50%"><button class="submit" onclick="document.getElementById('contact_form').submit()" type="submit">Send message</button></td>
<td style="text-align: right;" width="50%"><span class="c-clear"><button class="reset" style="color: #3c4247; letter-spacing: -0.5px;" onclick="document.getElementById('contact_form').reset()" type="reset">reset</button></span></td>
</tr>
</tbody>
</table>
</form>