Hi. Im making a web page that needs a specific function, but i cant for the life of me figure out how to do it.
I have my index that has you input 2 variables. What you want to to say, and how many times. (Its for a game im making.)
Thats easy enough. But what I need those variables to do, is use POST, and goto another webpage that requests and posts them...
What i cant figure out how to do is have a page, that refreshes every, lets say 5 seconds, then refreshes, goes to said POST the variables, and goto the web page. WHile at the same time keeping count of how many times its done it...
Any suggestions/Clarifying questions I can answer?
Thanks ahead of time.
PHP refresh, while carrying over variables.
Moderator: General Moderators
-
SidewinderX
- Forum Contributor
- Posts: 407
- Joined: Fri Jul 16, 2004 9:04 pm
- Location: NY
Re: PHP refresh, while carrying over variables.
You can use SESSION variables.
Re: PHP refresh, while carrying over variables.
Hrmm, Ok. I will look into those.
Thanks
EDIT: After i setup the session variable, can I just have it do the html meta tag refresh, and every time it refreshes would it
POST the data?
EDIT: After i setup the session variable, can I just have it do the html meta tag refresh, and every time it refreshes would it
POST the data?
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
The Session variables do not POST. Read up on how sessions work.
http://w3schools.com/php/php_sessions.asp
http://w3schools.com/php/php_sessions.asp
Re: PHP refresh, while carrying over variables.
Was already reading that page
. But how could I make it to so that if I had a frameset, 2 frames, one on top one on bottom. The tops frame displays how many times its posted, the bottom frame shows the posting in action... How could I get it to do that. Cause the page that actually grabs the text uses a $_REQUEST function to get it.
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: PHP refresh, while carrying over variables.
Ok ill attempt to clarify xD.
Ok so my program goes, Index.html, you enter the info.
Then it goes to Frame.html. Which has 2 frames in it.
Ticker.php is supposed to display, What you are saying, and how many times you have said it.
/Game/Say Gets the variable text, then says it in the game.
So the top frame displays what its doing, and how many times.
The bottom frame displays the game, and sends the variable.
Get it?
Ok so my program goes, Index.html, you enter the info.
Then it goes to Frame.html. Which has 2 frames in it.
Code: Select all
<frameset rows="25%,75%">
<frame src="ticker.php">
<frame src="/Game/Say">
</frame>
/Game/Say Gets the variable text, then says it in the game.
So the top frame displays what its doing, and how many times.
The bottom frame displays the game, and sends the variable.
Get it?