HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Help!! Trying to carry values from one game to ano...
Operating System - HP-UX
1834665
Members
2588
Online
110069
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2004 10:54 AM
12-08-2004 10:54 AM
Help!! Trying to carry values from one game to another
I wrote a program that gets user input by placing a bet as to what the dice turns up using rand. User submits and finds out their point balance and they have the option of playing the game again. How to I keep track of the points?(Carry them over to second round) What is the best way hidden fields? Cookies? Any suggestions would be greatly appreciated.
Attached is the program i wrote.
Attached is the program i wrote.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2004 11:32 AM
12-08-2004 11:32 AM
Re: Help!! Trying to carry values from one game to another
The answer is: It depends.
If you are going to be running this i a web based interface, a cookie is a good way to retain scoring information.
It its just one number, you can create a temporary file:
filename="dice$$.dat";
The filename is now dice.dat
You can save that file to the /tmp directory. I suppose if you were running this program on a popular gambling website you might have lots of temporary files, but this looks more like a class project.
Its also possible and easy to pass the fields through to a new form via http post methodology.
The script I'm attaching actually accepts data in hidden and non-hidden fields from a web based form.
SEP
If you are going to be running this i a web based interface, a cookie is a good way to retain scoring information.
It its just one number, you can create a temporary file:
filename="dice$$.dat";
The filename is now dice
You can save that file to the /tmp directory. I suppose if you were running this program on a popular gambling website you might have lots of temporary files, but this looks more like a class project.
Its also possible and easy to pass the fields through to a new form via http post methodology.
The script I'm attaching actually accepts data in hidden and non-hidden fields from a web based form.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP