Form Autopost

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
dreagose
Forum Newbie
Posts: 15
Joined: Wed Sep 02, 2009 9:28 am

Form Autopost

Post by dreagose »

I have a form that I need to be automatically submitted when it only has 1 option in it.
The form is dynamically built from a database read using a customers' selection from a previous page.

I planned on activating the automatic submission using an IF statement.

Code: Select all

if ($c == 1) auto submit code here
 
Can this be done in PHP or HTML? if so, How?

Thanks
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Form Autopost

Post by jackpf »

Javascript.

You can use

Code: Select all

document.forms['formid'].submit();
Post Reply