Skip to content Skip to sidebar Skip to footer

Submit Form Using Only Php? Without Javascript?

I have a form
<

Solution 1:

The act of form submission is done on the client side (browser) and has very little to do with PHP (server side).

You could add a submit button like <input type='submit' value='click here to complete step' />

Solution 2:

A form must be submit, by the client side. On client-side, there's only two way: by Javascript or by human (clicking on the submit button).

Solution 3:

Why not just use the <input type="submit" /> like the following:

<form method='post' action='action.php' name='myForm'>
  <inputtype='text' name='id' value='id' />
  <inputtype='submit' name='submission' value='Submit id'>
</form>

Solution 4:

add a submit button.

<inputtype="submit" value="Submit" />

Solution 5:

Unfortunately, what you are trying to do is not possible. The best you can do is probably this:

<formmethod='post'action='action.php'name='myForm'><inputtype=''name='id'value='id'><inputtype='submit'id='submit-button' /><script>domument.getElementByID('submit-button').style.display="none";document.myForm.submit();</script></form>

A submit button is displayed when client side scripting is disabled. When it's enabled, the submit button is immediately hidden and the form is automatically submitted.

EDIT

Or you could simply include the PHP file. <?php include action.php; ?>. You won't have access to the _POST array, but considering, the client hasn't had chance to enter any data, that won't really matter.

Post a Comment for "Submit Form Using Only Php? Without Javascript?"