Home  >  Q&A  >  body text

PHP form not posting submit button correctly

I am making an application form but the form is not working. When I click the submit button, it doesn't even run the if statement to post the variables.

My form tags look like this:

<form method="post" enctype="multipart/form-data">

My submit button looks like this:

<button name="submeter" type="submit" class="btn btn-gfort">Submeter</button>

The if statement in my form looks like this:

if(isset($_POST['submeter'])) {

I even tried running the JS alert just to see if it actually made it into the if statement, but it didn't. There are no console errors either.

Thanks for any help

P粉450079266P粉450079266222 days ago451

reply all(1)I'll reply

  • P粉066224086

    P粉0662240862024-04-04 00:16:35

    Have you added method="post" to the

    tag?

    reply
    0
  • Cancelreply