Forum Moderators: coopster & phranque

Message Too Old, No Replies

Automatically Submitting Forms

How to submit website forms automatically

         

brentpaine

11:57 pm on Mar 13, 2003 (gmt 0)



Does anyone know of a customizable application that can be used to submit website forms automatically. I am currently working on a project where the customer needs to submit bulk data through a backend system to an SQL database. I really don't want to write this manually so I was hoping that there might be an app on the market that would help out with this.

Anyone know of anything?

gethan

1:07 am on Mar 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Brent,

Welcome to WebmasterWorld

I don't know of any available application that would force data through a webform.

But you could write some javascript and php to do this, name your form and then use the onload event to submit it. eg.


<body onload='document.testform.submit();'>

<form action='test.php' name='testform'>
<input type=input name=val1 value='test'>
<input type=input name=val2 value='1'>
</form>

</body>

You could then have some php that generates each page pulling the information required from your csv or db etc - then populating itself and then submitting itself - or if a different script use the javscript to populate the other form (in a frame) and submit it.

Ok -- not a quick easy solution.

dive into perl

7:38 am on Mar 14, 2003 (gmt 0)

10+ Year Member



Hi Brent,

You could write a Perl script to allow your customer to upload a data file to your server then use the Perl module Mechanize.pm [search.cpan.org] which has been written to automate interaction with a website.

Is there any particular reason why the data needs to submitted via a form?

If you can allow the user to upload the data file in a specified format, you can use Perl / PHP to process the file and interact with the database directly.