Hi, i've made code that needs to refresh page if result is set: if($result){ echo "<meta http-equiv=\"refresh\" content=\"0;URL=del.php\">"; Code (markup): and i need to execute form on that refresh <form action=" "> <input type="hidden" name="upern" value="<?php echo $name; ?>"> <input type="hidden" name="uperc" value="<?php echo $sname; ?>"> </form> Code (markup): anybody could help me with that, please?
You'd probably need to do this with javascript, rather than php e.g. put this somewhere after the form (assuming that it's the first form on your page) <script> document.form[0].submit(); </script> Code (markup):
thanks for reply, but that code if($result){ echo "<meta http-equiv=\"refresh\" content=\"0;URL=trinti.php\">"; echo '<form action=" " name="MyForm">'; echo '<input type="hidden" name="upern" value="'; echo $name; '">'; echo '<input type="hidden" name="uperc" value="'; echo $sname; '">'; echo '</form>'; echo '<script> document.MyForm.submit(); </script>'; Code (markup): doesn't give me what i want. i will try to make it more clear, when i am doing that refresh echo "<meta http-equiv=\"refresh\" content=\"0;URL=trinti.php\">"; Code (markup): i need those variables $name and $sname to be posted. and i would like to avoid js.