/    Sign up×
Community /Pin to ProfileBookmark

Help… Memorizing values

I just started learning PhP. I’ve got a good handle on it, as far as variables and some of the simple functions go.. Right now, I’m just playing around with some ideas.
One thing I’de like to do is put a form on my site where users can enter values that would be assigned to variables, and would be saved. But, the trick is, I don’t want the values hardcoded. The plan is to build a small-scale text based game where the user can earn experience points, items, build stats. But, by using cookies (at least as far as I know and have seen), the values they enter are permanent.
But, the catch is that I can’t use MySQL, and I’de rather not learn SQL for something this small. I’ve looked into Java, but I’m not sure if I know what I’m doing. I’ve thought about learning C, or C++.. But I’de rather this be online (Can C++ be built to play online?).
If anyone has some tips for me, they’de be greatly appreciated.

to post a comment
PHP

6 Comments(s)

Copy linkTweet thisAlerts:
@felgallJul 22.2005 — If youare unable to use a database then you will need to use a text file to store the information instead. PHP can read and write text files so is probably your best choice since you have already started learning it.
Copy linkTweet thisAlerts:
@danielson13fxauthorJul 22.2005 — Hm... Any suggestions, resources, tutorials... Anything I could find to learn this? I think there's something in this book here, but I'm no textbook learner. I get 15 minutes into the book, and it's just words. Heh.

Thanks.
Copy linkTweet thisAlerts:
@CompGeek01Jul 22.2005 — Hm... Any suggestions, resources, tutorials... Anything I could find to learn this? I think there's something in this book here, but I'm no textbook learner. I get 15 minutes into the book, and it's just words. Heh.

Thanks.[/QUOTE]


I know what you mean about reading books. When I need to find how to do something in PHP I normally just go to php.net and see.

http://us3.php.net/manual/en/function.file-put-contents.php

Along the left bar there are other functions that will help you out with this. Ther are also hundreds of user samples in the comments.
Copy linkTweet thisAlerts:
@danielson13fxauthorJul 22.2005 — Awesome. Thanks alot. Heh. You've made my... well.. Month. Heh. I've been trying to figure this out for some time, now.
Copy linkTweet thisAlerts:
@agent_x91Jul 22.2005 — I'm no PHP programmer, but I can reccomend Java for a task like this. I've been making and selling games in Java for a little while now. Good money?. No point if you don't know any Java though.
Copy linkTweet thisAlerts:
@danielson13fxauthorJul 22.2005 — I've BlueJ, but I can't seem to get it working... I'm sure I could figure it out, so, supposing I did try to learn some Java (I've a friend who knows Java), any help you could offer?

(I'm quite lazy.. If you know any scripts, or.. anything.. Yeah. Heh.)
×

Success!

Help @danielson13fx spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...