Alex Rivera | Logout

How do I make a PHP form that submits to self?

Asked 2011-04-29T01:03:32.090
59

How do I make a self-posting/self-submitting form, i.e. a form that submits the results to itself, instead of submitting to another form?

Edit
Report

1 Answer

3

Your submit button doesn't have a name. Add name="submit" to your submit button.

If you view source on the form in the browser, you'll see how it submits to self - the form's action attribute will contain the name of the current script - therefore when the form submits, it submits to itself. Edit for vanity sake!

answered 2011-04-29T01:05:01.563

Your Answer