Click to See Complete Forum and Search --> : Looping Submit


myanavrin
07-11-2007, 10:32 AM
Hello to all,

How can I create a looping submit. I want to create a webpage that changes its value then submit automatically while in a loop. Hope you get my point.

cluettr
07-11-2007, 11:08 PM
You can continually post a value and check for the existance of the posted value at refresh. Could you explain a little further what you are trying to do and I may be able to offer a better solution?

myanavrin
07-12-2007, 09:42 AM
Ok, I have a textarea and a submit button. What I want to happen is when I click the submit button the values inputed in textarea will be submitted one by one. I used $wordsarray = explode("\n", $_POST['words']); to distribute the values of textarea in an array.

ex. I input this values in the textarea

thank you
very much
web developer
php

Now when I click the submit button "thank you" will be process first then "very much" and so on. Hope It makes much clearer to you.

cluettr
07-12-2007, 11:08 AM
You cannot pass an array as an object via url injection. You'll have to break those out as distinct variables and pass them as a long string. I also don't beleive you can use the POST method with an array object.

Keep in mind that there are two possibilities here, you can submit the form as a post or as a GET... both use different means to get the data to the action script (in this case the action script being itself).

I'm not a big fan of generating code in these forums because it takes a lot of time but I would look into the PHP $_GET method as well as the $_POST method to get a better understanding of how you can do this. Using the $_GET method you can acheive this by having the refresh meta tag call itself every 60 minutes or so and sending the values via the url injection method ($_GET) as opposed to $_POST.