Jump to content

Automated form submittion problem


cyberbob1uk

Recommended Posts

Hi,

 

I have just shy of 4500 records to insert into a website's database, of which I am a member.  Whilst I can do this record-by-record manually, im struggling to to automate the form submission.

 

Manually, I use the following form:

 

<form name = "rmUpload" action = " <URL> ">
<input type = "hidden" name = "username" value = "USER">
<input type = "hidden" name = "password" value = "PASSWORD">
<input type = "hidden" name = "date" value = "<?php echo $hdate ?>">
<input type = "hidden" name = "actual_dep_time" value = "00:00">
<input type = "hidden" name = "actual_arr_time" value = "00:00">
<input type = "hidden" name = "location_dep" value = "<?php echo $row[CRS_dep] ?>">
<input type = "hidden" name = "location_arr" value = "<?php echo $row[CRS_arr] ?>"><br>
<input type = "hidden" name = "tops[]" value = "<?php echo $row[h1] ?>">
<input type = "hidden" name = "tops[]" value = "<?php echo $row[h2] ?>">
<input type = "hidden" name = "tops[]">
<input type = "hidden" name = "tops[]"><br>
<input type = "float" name = "distance" value = "<?php echo $miles ?>.<?php echo $chains ?>">
<input type = "hidden" name = "headcode" value = "">
<input type = "hidden" name = "route" value = "">
<input type = "hidden" name = "notes" value = "<?php echo $row[notes] ?>">
<input type = "submit" value = "SEND">

 

Any values are correct, just couldnt be bothered editting them all out.

 

For single items its ok, but it redirects to the remote website stated in the 'action' part of the form, this obviously doesnt work right when used in a while statement.

 

How can I get it to work so that I can pull my details from a mysql dB and continue to submit the form until all 4500 records have been transferred?

 

I must provide all $_POST variables as key/value pairs.

 

I have tried experiments with cURL but just get an error saying I need authorisation to use that resource

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.