php submit without user click

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nathanmox
Forum Newbie
Posts: 1
Joined: Thu Feb 14, 2013 1:58 pm

php submit without user click

Post by nathanmox »

how can i use php to submit a form without the user clicking.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: php submit without user click

Post 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.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: php submit without user click

Post 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.
(#10850)
Post Reply