How can we submit a form without a submit button?

Answer Posted / anand chowdhary

This is the prefect answer:

<html><body>
<form action="what_ever.ext" method="post" name="MyForm">
<input type="hidden" name="hiddenfield1" value="<? echo $some_important_value; ?>">
</form>

<script language="javascript" type="text/javascript">
document.MyForm.submit();
</script>
<noscript><input type="submit" value="verify submit"></noscript>
</body></html>

Is This Answer Correct ?    18 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which function would you use to insert a record into a database in php?

560


How to get the position of the character in a string in php?

614


What are the php variables?

525


Is salary a ratio or interval?

547


What is rtrim php?

543






What are the main error types in php?

513


How do you end a session in php?

552


What is difference between echo and print in php?

493


How to send email using php script?

508


Does jwt protect against csrf?

483


What is the difference between file_get_contents() and file_put_contents() in php?

673


What is php key?

503


What's the difference between using mysql_ functions and pdo?

519


How to get elements in reverse order of an array in php?

564


Will react hooks replace redux?

509