php submit without user click
Moderator: General Moderators
php submit without user click
how can i use php to submit a form without the user clicking.
Re: php submit without user click
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.
You can use Javascript to do it, though. Grab the form object and call its .submit() method.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: php submit without user click
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.
(#10850)