Jump to content

Form isn't submitting

Go to solution Solved by Ciccioo,

you're doing this:

<td>      <form></td><td>      </form></td>

which isn't valid HTML. the parser will most likely put the form inside the first TD, so the submit button in the second TD doesn't fall inside any FORM therefor it doesn't submit anything

 

you could just put the whole table inside the form

I'm building a little game just for fun anyway i'm having a problem with just one form.

<tr>	<th>Company Fee</th>	<td><form data-ajax='false' method='post' action=''><input type='number' name='pp' min='0' value='".$row['pp']."'></td>	<td><input type='submit' value='set'></form></td></tr>

when I press the button it does nothing but hitting enter inside the text field does submit the form. I tried creating a new HTML file and the form worked fine so why isn't it working while in the table?

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
https://linustechtips.com/topic/399488-form-isnt-submitting/
Share on other sites

Link to post
Share on other sites

you're doing this:

<td>      <form></td><td>      </form></td>

which isn't valid HTML. the parser will most likely put the form inside the first TD, so the submit button in the second TD doesn't fall inside any FORM therefor it doesn't submit anything

 

you could just put the whole table inside the form

Link to comment
https://linustechtips.com/topic/399488-form-isnt-submitting/#findComment-5384477
Share on other sites

Link to post
Share on other sites

you're doing this:

<td>      <form></td><td>      </form></td>

which isn't valid HTML. the parser will most likely put the form inside the first TD, so the submit button in the second TD doesn't fall inside any FORM therefor it doesn't submit anything

 

you could just put the whole table inside the form

 

Thanks :P moved the form start and end out side the table and it worked.  Silly things that break stuff ^_^

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
https://linustechtips.com/topic/399488-form-isnt-submitting/#findComment-5384519
Share on other sites

Link to post
Share on other sites

^_^

this kind of error is easy to avoid if you take the habit of indenting properly. everything will be much easier to see

yeah it had been a long day coding the clan type part of the game so i was getting a little tried lol. thanks for the help

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
https://linustechtips.com/topic/399488-form-isnt-submitting/#findComment-5389361
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×