[Solved] PHP form does not submit [closed]


Put the script after the form tag. It searches dateForm id and until that no form is in the output so it does nothing. When you place that after it, it’ll search the page for that id and it finds that and submits.

<?Php
if($something):?>

<form  id="dateForm" action="https://www.paypal.com/cgi-bin/webscr" method="POST">
<input type="hidden" name="test" value="test">
<input type="hidden" name"test2" value="Support">
</form>

<script type="text/javascript">
    document.getElementById('dateForm').submit(); // SUBMIT FORM
</script>

<?php
endif;?>

4

solved PHP form does not submit [closed]