Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How can we submit a form without a submit button using PHP programming language?

user-image
Question added by Yasmeen Husam , Web Developer , Al Fahid Systems
Date Posted: 2019/01/31
nabeel javed
by nabeel javed , React JS , Pure Magic events and organization

PHP is server side language and the form is submitted via client side via javascript . to make the submit happen catch the event by javacript by giving an id on the form and prevent its default behavior by document.getElementById and e.preventDefault() and get the fields value in the same way and afterwards use fetch api to communicate with the backened

Farrukh Khan Jadoon
by Farrukh Khan Jadoon , Supervisor , A2C Services LLC

yes it is....

When it comes to development, nothing is impossible. And by impossible I really mean impossible, you can do any thing you can imagine.

Your query can be solved with the help of both java script and ajax. all you have to do is use events like blur or change etc. and you can can perform a form submission.

In fact java script have submit functions which can be submit the for to required action.

now perhaps you will be thinking m just telling you the possible ways but why am i not giving you the exact code of name of the function, this is because I want you to search for it. Because in the journey you will learn few more things which will help you in future.

best of luck. Thank you

ZEESHAN undefined
by ZEESHAN undefined , frontend web developer , Uforia Logic

Dont want to add button at all ?

  1. add onkeyup event on last input field
  2. if the key is "Enter" run your code to validate and submit

Nandalal s
by Nandalal s , PHP developer , Aries Estrrado

Using Button Id we can able to submit the form by taking each elements value.

Mohamed Irshad
by Mohamed Irshad , Senior Software Engineer , Zynga

Add javascript code to auto submit the form based on some events like after verifying that the form is completely filled

abdalla matar
by abdalla matar , IT Web administrator , Abu Dhabi Department Of Education And knowledge

BY using javascript and and assign a submit method

sonu agrawal
by sonu agrawal , software testing engineer , primavera systems

using submit() methos in javascript

Dana Kaplan
by Dana Kaplan , Assistant instructor , University Of Kalamoon

it can e done by using Javascript "submit()" function.

By simply including some JavaScript code

Abdelkarim AKKARI Akkari
by Abdelkarim AKKARI Akkari , System Analyst , Flocert GmbH

Via JS using document.getElementById("form_id").submit();

form_id is the form id.

David Spautz
by David Spautz , Backend Developer , Evopark GmbH

I prefer not to use PHP. Use more modern Languages

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.