Reputation: 884
I am creating a student information form in html as in the image:
My next button is an image and the code for it is as follows:
<input type="image" id="registersubmit6" name="registersubmit6" src="images/arrow-right.png" title="finish" onclick=""/>
When user clicks on next button, I want to submit this form and move to next page.How I can do both at the moment?
Should I use javascript or PHP? and if yes then how?
Upvotes: 0
Views: 8396
Reputation: 43166
<input type="image" id="registersubmit6" name="registersubmit6" src="images/arrow-right.png" title="finish" onclick="submitForm()"/>
function submitForm(){
document.getElementById('id of your form').submit();
}
Upvotes: 1