hi guys im sending infor from a form <form method="post" action="https://www.sendtohere.com"> <INPUT name="d" type="hidden" value=" your name"> <INPUT name="c" type="hidden" value="your add"> <INPUT name="b" type="hidden" value="your ref"> <? echo "<INPUT name='a' type='hidden' value='.$phNo.'>"; echo "<INPUT name='aa' type='hidden' value='Hi '.$names.' .'>"; ?> <input type="submit" value="Send"> im using php aswell as html...what i want to do is to leave the button out, so that the form POSTS the information automatically without having to press the button as its going to work in the background. Can anyone tell me how to do this Thanks Guys
you could put an onload call in the body tag of the html to submit the form. If you are using php I am sure there is a more elegant way of trying to accomplish what youare doing. This code might not have the right syntax but should give you some clues. <body onload="javascript:form.formname.submit();">
cheers mate i got it by doing this <script type="text/javascript" language="JavaScript"><!-- document.sendReg.submit(); //--></script>
This can't be done using HTML alone, and is recommended that it NOT be done at all. What is the point of having a form if it can't be submitted? Also don't forget that some people don't use browsers that have JavaScript enabled (or supported), and a lot of mobile devices that can access your site as well don't support JavaScript well (if at all).