HELP on data passing

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
qqragoon
Forum Newbie
Posts: 17
Joined: Wed Nov 15, 2006 6:17 pm

HELP on data passing

Post by qqragoon »

newbie here.... i am trying pass data from one page to multiple pages.... In a FORM, i can only put one page into the ACTION filed. Can anyone help? thx[/quote]
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

That's all a form can do. What, specifically are you trying to accomplish?
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

Use AJAX...or propagate that data onto other scripts using an HTTP library on the server side???

Code: Select all

1) Send data to your server (using normal HTML submit) with PHP script catching FORM data
2) Your script forwards that FORM data onto X number of other scripts
Cheers :)
qqragoon
Forum Newbie
Posts: 17
Joined: Wed Nov 15, 2006 6:17 pm

Post by qqragoon »

I have create a inital page to get a set of data. Let's call it data1, data2 ......data 8. Different data needs to go to different page for calculation. Such as data1 needs to go web page1, data2 needs to go web page2 ...ect. I know the form has limitation. What else I can do to accomplish this? database is overkill for this. Just need something small or some trick. Another thought I have is to combine those web pages into single page with tab on it (or something like that) But, not sure if that is going to work. thx
qqragoon
Forum Newbie
Posts: 17
Joined: Wed Nov 15, 2006 6:17 pm

Post by qqragoon »

Hockey wrote:Use AJAX...or propagate that data onto other scripts using an HTTP library on the server side???

Code: Select all

1) Send data to your server (using normal HTML submit) with PHP script catching FORM data
2) Your script forwards that FORM data onto X number of other scripts
Cheers :)
Can u give me example? thx!!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Do you have all these pages on your server? Can you not build them into a single page?
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Post by califdon »

I think what's confusing us here, qqragoon, is why you are using multiple "web pages" -- after all, you can only view one web page at a time, what do expect those web pages to do?? I suspect you really mean "php scripts" that will do some form of calculation. Probably you can do it all in one script. But the basic question is: what do you want to happen after you collect this data? You implied that you're not going to store it in a database. Are you going to display something to the user? If so, the php script that's called in the 'action' parameter of the form should accept all the data and display whatever you want to display in a web page. If there's more data that might be required at a different point, you might store them as Session Variables, available to the next script. Or you could store them in hidden Input controls on the web page that you send to the browser, to be "forwarded" to some other script called from the first web page. Help us to help you by explaining what you're trying to do.
qqragoon
Forum Newbie
Posts: 17
Joined: Wed Nov 15, 2006 6:17 pm

Post by qqragoon »

califdon wrote:I think what's confusing us here, qqragoon, is why you are using multiple "web pages" -- after all, you can only view one web page at a time, what do expect those web pages to do?? I suspect you really mean "php scripts" that will do some form of calculation. Probably you can do it all in one script. But the basic question is: what do you want to happen after you collect this data? You implied that you're not going to store it in a database. Are you going to display something to the user? If so, the php script that's called in the 'action' parameter of the form should accept all the data and display whatever you want to display in a web page. If there's more data that might be required at a different point, you might store them as Session Variables, available to the next script. Or you could store them in hidden Input controls on the web page that you send to the browser, to be "forwarded" to some other script called from the first web page. Help us to help you by explaining what you're trying to do.
Thanks for your reply. What I am trying to do is to build an easy utility page for industry vehicle power system. Each vehicle has number of power boxes. And the utility will take the data that needed to configure these boxes... calculate the data, displaying for the technician. (Here is the problem. Since there are too much data for single page, so I want to display the data in single page for each different box) Then, the data needs to be exported together again. Session Var might be the way to go.... I will find out. Thanks again.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Yeah, sessions may be better here. Have the catching page calculate all the information, store it into the session variables and then begin paginating the resulting information.
Post Reply