View Full Version : Auto loop Form
12-17-2008, 03:50 PM
I'm trying to get it to post to my forum with a different twist (a new website etc, long story short)
But right now I'm trying a simple test of this method. So I'm having it submit data to a page multiple times...
$i = 1
form info here
while($i <= 10);
In the form, it'll change just one value, and then resubmit it until that value = 10.
Really simple to do, but I don't know how to get a form to automatically submit. Right now, it'll just display the form 10 times DD::confused:
Also, I don't know any of the variables on the next page. I'm pretty sure it uses post data, because it doesn't show up in the url :P.
12-17-2008, 03:56 PM
Where is the bit that is supposed to submit the form?
12-17-2008, 04:02 PM
uhm, For now I'll just make it a random page =/.
So it'd be something like:
<form action=thispage.php method=post>
then just a few text input boxes...
but the main thing I can't figure out is how to send the all the looped/changed data to the page.
I'm developing it to make 100 posts in a thread instantly.
Point is, once I get it to auto submit, I can get it setup with the current data in the forum via modifications. But I need to know how to set it up to do that :P.
So it sends the data, rather than shows the form multiple times.
12-17-2008, 07:23 PM
OK well you can't really do it that way. Your browser is the mechanism that submits a form which then sends a POST or GET HTTP request back to the webserver, which then processes your PHP script, which then heads back out to your browser.
So your loop would have to include that entire journey, which can't be achieved inside a PHP script, which is only part of the journey.
p.s. there is actually a way to send HTTP requests to the webserver using PHP, which could of course be put inside a loop. However I wouldn't see the point, if what you really want to test, or exercise, is the form submittal process. But if you want to give it a shot, look into fsockopen(), and/or curl.
12-20-2008, 03:55 PM
I tried both of those, neither worked (well) to my level of ability.
My idea is to store it all in an array, and then send the arrays, each holding the info from each one.
but then I'd have to alter all of the other pages, which I can't do since it's a premade script (and uses so many different inserts it's not even funny).
So what I need to do is put all of the post data on the same page as the forms for a certain number of time. and then it just submit all of that at once (as different forms).
Can anyone give me a headache break with some potential possibilities? This really has my head raped right now XD.
12-23-2008, 12:36 PM
Can someone move this to JavaScipt please?
Or should I just repost it there?
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.