/    Sign up×
Community /Pin to ProfileBookmark

Form submission automatically

Hi

I am trying to submit the form automatically without button, but its not working. Following is the code

<?php

$name=”Myname”;

<form name=”MyForm” action=”/cgi-bin/matweb.exe” method=”POST”>
<input type=”hidden” name=”mlmfile” value=”test”>
<input type=”hidden” name=”name” value=” <?PHP echo $name ?>” >
<p><input type=”submit” name=”Submit” value=”Execute”></p>

</form>

<script type=”text/javascript” language=”JavaScript”><!–

document.MyForm.ThisPageURL.value = document.URL;

var x = new Date();

document.MyForm.TimeZoneOffset.value = x.getTimezoneOffset();

document.MyForm.submit();

//–></script>

?>

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@SheldonJun 17.2007 — Your asking about javascript in the PHP forum, you have a submit button? and you are sending the form to an exe? None of this will work? and why automatic submit the form, what if the user hasn't finished? or even started?
×

Success!

Help @makhan spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...