Re: How to submit form via PHP
| From: | Ashley Sheridan | Date: | Sun, 28 Sep 2008 08:47:47 +0000 |
| Subject: | Re: How to submit form via PHP | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-281066@lists.php.net to get a copy of this message | ||
On Sat, 2008-09-27 at 21:37 -0700, Waynn Lue wrote:
> >No it doesn't... without an action statement...
>
> Sorry to drag up an old thread, but I just saw this. Is that true of
> all browsers? I'm wondering because I just coded a site to use this
> behavior, then I saw that the html specification says the action
> attribute is required.
>
> Thanks,
> Waynn
>
> On 8/15/08, Robert Cummings <robert@interjinn.com> wrote:
> > On Fri, 2008-08-15 at 13:30 -0500, Jay Blanchard wrote:
> >> [snip]
> >> Hello. I'm pretty noob in PHP and would like to know how can I submit
> >> some HTML form got via file_get_contents(URL). For example:
> >>
> >> <form name="someform" method="post">
> >> <input type="submit">
> >> </form>
> >>
> >> so how can I submit 'someform' form.
> >>
> >> Thanks in advance for any suggestions.
> >> [/snip]
> >>
> >> Click 'Submit'
> >>
> >>
> >>
> >> Your form tag needs an action statement
> >
> > No it doesn't... without an action statement it will submit to the same
> > URL in which it was presented.
> >
> > Cheers,
> > Rob.
> > --
> > http://www.interjinn.com
> > Application and Templating Framework for PHP
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
Without the action attribute, the form submits to itself, i.e. a form on
contact.php submits to contact.php without an action attribute being
specified.
Ash
www.ashleysheridan.co.uk