How can we submit a form without a submit button?

Answer Posted / saiprasad

<script type="text/javascript">
function submitform()
{
document.forms["myform"].submit();
}
</script>
<form id="myform" action="submit-form.php">
Search: <input type='text' name='query'>
<a href="javascript: submitform()">Submit</a>
</form>

Is This Answer Correct ?    12 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does mysql need php?

676


What is the difference between Session and Cookie?

772


What is the Default syntax used in PHP?

785


How to Retrieve the Session ID of the Current Session?

712


What is the difference between implode() and explode() in php?

667


What is the importance of php?

701


What new features php7 has in store for us?

739


How does php and apache work?

732


How do I install php?

790


Explain what is the use of "echo" in php?

750


What do the initials of php stand for?

770


What are interfaces in php?

678


Can php run on windows server?

705


What is php array function?

724


Where can I learn php?

693