Jump to content

PHP - Sending Data with forms


grindmaster

Recommended Posts

Hy,

I'am fresh in web Developement and I'am wondering why sending data via forms opens the php-file automaticly instead of working with the data in the backround.

<table class="table table-bordered">
	  <form action="php/interface.php" method="post">
	  	<thead>
     	 <tr>
		  <th><input type="submit" ></th>
        <th><p>Serie: <input type="text" name="serie" /></p></th>
        <th><p>Korn: <input type="text" name="korn" /></p></th>
      </tr> 
    </thead>
   </form>
  </table>

 

On the php-site I then want to take the user input, built a query -> save the result in a php-var - konvert it to Json and then do something in Javascript to display the result

in the Frontend. The Query and the conversion etc. works, 

but my Problem is, that pressing the submit button opens the php-file.:huh:

Link to comment
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
×
×
  • Create New...