Forum Moderators: coopster

Message Too Old, No Replies

Sending variables from one page to another

         

FnTm

7:37 am on Jun 20, 2008 (gmt 0)

10+ Year Member



HI!

I curently have a problem with some variables and a piece of #$%# application.

My employee has an application, that i have to use. Its is lika a database, but the queries are somewhat complicated so i have a special page, that has my query creating sequence. I allso have a new project, that takes anywhere from 10 to 200 rows of mysql data, and then, through a for loop, sends it to his page, one by one. But i need it to be automated.

How should i do this?

Now I have a form, and when i press submit, the process is started, but i just cant think of a way to send the data to the query page.

Help please?

coopster

6:56 pm on Jun 20, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I must admit, I don't understand. You are attempting to post form data automatically?

FnTm

5:47 am on Jun 25, 2008 (gmt 0)

10+ Year Member



Ok, so here I go again!

I have a special application, or better yet, a whole server that runs this one application, and it is sort of a database, and I use a special script, to put data into this application. But that is not the problem. The problem is, that is is a seperate script, and i have to submit an individual form to this page, so that it would work.

And because this application is sooooo slow, I had to create a loop with 15s delay, so that the application wouldnt crash.

What i would like to know, is how to submit each loop automatically, to this page, without clicking any buttons.

Is this even possible to do with only PHP? Because ive seen something like what I need, done with ajax.

O, just a quick idea. Maybe i should make the script into a function, and in the loop, i should call upon this function? Could it work?

coopster

11:59 am on Jun 25, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You can open a socket and post to the form automatically by sending your headers and data. Have a look at fsockopen [php.net] and/or perhaps the cURL Functions [php.net].

FnTm

6:06 am on Jun 26, 2008 (gmt 0)

10+ Year Member



Any chance you could give me an example on how this works? Because i tried to do this thing with sockets, and just couldnt get it to work for me.

eelixduppy

7:33 am on Jun 27, 2008 (gmt 0)



This might help you out: [webmasterworld.com...]

:)