how to submit without submit button?

SNIP

happygeek commented: spam -3

Recommended Answers

All 4 Replies

could you be more specific....don't quite get you

anyways, if would you like go to another page use this

header("location:insertphpnamehere.php");

go to a page after a certain time

header("refresh:1;url=insertphpnamehere.php");

Hi,

Do you mean text link to submit the form? Actually, you can use images if you want. We cannot accomplish this by using PHP. It has to be javascript.. I was going to advice you to post your question in the javascript forum, but I figured out the codes for it is pretty short. So, I guess I have to give it a try..

<!-- you can put the javascript anywhere in the page.. this is not one of those has to be on the head, better yet put it just above the body closing tag -->
<script type="text/javascript">
function submit_thisform()
{
    document.forms["this_form"].submit();
}
</script>

<!-- here is our form with the id = this_form -->
<form id="this_form" action="" method="post">
<input type="text" name="input1" value=""/>
<input type="text" name="input2" value=""/>

</form>
<a href="javascript: submit_thisform()" >Submit This Form </a>

there you have it :)..

how to submit without submit button?

SNIP

With javascript submit.

Member Avatar for diafol

BIG SIGN
sigspammers get help here!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.