Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

script inside php

<?php
    if(isset($_POST['btn'])){
        //do some task
    ?>
    <script type="text/javascript">
        var e = document.getElementById('testForm'); e.action='test.php'; e.submit();</script>
    <?php
    }
    ?>
<form name="testForm" id="testForm"  method="POST"  >
    <input type="submit" name="btn" value="submit" autofocus  onclick="return true;"/>
 </form>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #script #php
ADD COMMENT
Topic
Name
4+4 =