Jump to content

submitting form automatically


makhan

Recommended Posts

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>

     

?>

 

Link to comment
https://forums.phpfreaks.com/topic/55909-submitting-form-automatically/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.