Re: Using link to submit a form

From: Date: Wed, 30 Jul 2003 19:35:58 +0000
Subject: Re: Using link to submit a form
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-157582@lists.php.net to get a copy of this message
Hi everyone, Hi,
Can I replace "Submit" buttons on forms with a text button? I need to be able to click on a link: <a href=index.php?option=edit>Edit</a> and have it submit the form. The form only contains one field...does anyone know how to do this? I've been searching google for an answer, but couldn't find any info that really applies to my question. This isn't exactly a PHP related question, but php is hugely involved in this project.
Yep, you're right, nothing to do with PHP :/ Anyway, you'll got to use javascript. Make sure you place the link after the </form> tag : <a href="javascript:document.forms[0].submit()">Submit</a> Mehdi

« previous php.general (#157582) next »