Page 1 of 1

php submit without user click

Posted: Thu Feb 14, 2013 2:14 pm
by nathanmox
how can i use php to submit a form without the user clicking.

Re: php submit without user click

Posted: Thu Feb 14, 2013 3:04 pm
by requinix
No. PHP runs on the server, forms and clicking are on the client. The two are wholly separate.

You can use Javascript to do it, though. Grab the form object and call its .submit() method.

Re: php submit without user click

Posted: Thu Feb 14, 2013 3:43 pm
by Christopher
If you want the page to auto-submit -- after a time limit for example -- then use Javascript. You can use libraries like cURL to submit a from during the execution of a PHP page.