cyberbob1uk Posted August 7, 2011 Share Posted August 7, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/244152-automated-form-submittion-problem/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.