hi there,
i have tried numerous fixes on the net but none are working. basically my form sends an email in php script but after the form has been submitted. this works if i physically press the submit button on my page.
i want to have it where it will submit on page load as i will setup a cron job to execute the page daily.
form code and one way i have tried but did not work:
<form method="post" id="form1" name="form1" action="<?php echo KT_escapeAttribute(KT_getFullUri()); ?>">
<table cellpadding="2" cellspacing="0" class="KT_tngtable">
<tr>
<td class="KT_th"><label for="EmailStatus">EmailStatus:</label></td>
<td><input type="text" name="EmailStatus" id="EmailStatus" value="<?php echo KT_escapeAttribute($row_rsemail_log['EmailStatus']); ?>" size="32" />
<?php echo $tNGs->displayFieldHint("EmailStatus");?> <?php echo $tNGs->displayFieldError("email_log", "EmailStatus"); ?></td>
</tr>
<tr class="KT_buttons">
<td colspan="2"><input type="submit" name="KT_Insert1" id="KT_Insert1" value="Insert record" /></td>
</tr>
</table>
</form>
<script>
document.Form1.submit();
</script>
thanks