Wednesday, 12 August 2015

How To Submit a form without a submit button?

01:22

simple just use following code of javascript   save it as  example.html :

(1)example.html

<script type="text/javascript">

function submitform()

{

  document.myform.submit();

}

</script>

<form name="myform" action="handle-data.php"  method="post">

Search: <input type='text' name='query'  />


<a href="javascript: submitform()">Search</a>


</form>


(2)handle-data.php file :

<?php

$query=$_POST['query'];

echo $query;

?>

Written by

We are Creative Blogger Theme Wavers which provides user friendly, effective and easy to use themes. Each support has free and providing HD support screen casting.

0 comments:

Post a Comment

PHP Training Mumbai, PHP MySQL Training Mumbai, PHP Course Mumbai, PHP Institute Mumbai

 

© 2013 PHP TRAINING IN MUMBAI BY OM SIR . All rights resevered. Designed by OM SIR

Back To Top