I am trying to submit a form automatically without the need to press the submit button. What I’m trying to achieve is, a page gets the information, processes that information and then redirects it to the other page.
My approach on the redirection so far:-
<form action='<?php echo $url;?>' method='post'>
<input type='hidden' name='hiddenInfo' value='<?php echo $myInfo;?>'/>
</form>
<?php
header("Location:$url");
I know the above code does not work but I’m just trying to show what my approach is. Is it even possible to automatically submit the data without any event handler.
So far I’m trying to avoid the <meta http-equiv="refresh" content="0;url=http://www.mysite.com/info/"/>.
Thanks in advance.
Couldn’t you just use $().submit() on document ready?
or:
or: