Okay, i'm guessing this is either not going to be possible or i'm just very stupid and have overlooked it. Probably the latter, but i'm learning :P
I've been trying to (it's going to sound easy) get a value out of the database and into a table cell. I can do that, but I need to take a member specific value out. As in, I can take out a value, but i can only show all values or only one, and it would be the same for everyone.
Maybe i'm not clear enough - i'm trying! :)
I'll give you the scenario:
- I have one table: 'users',
- I have 4 fields: 'ID', 'username', 'password', 'gold',
- I am trying to paste the member's gold on a page.
First and foremost, welcome to the community, Nathan! I hope you stick around and mingle!
As for your little problem, you will be wanting to add a
Let's assume that the user's ID is stored in a session variable called
Now, to add the
Thus, if the ID is in
I hope this helps you! Incidentally, is this for a game? Do we good folks get a sneak preview? :-)
This should do the trick:
PS. There's no need to do a
I will be going to bed now, but will definately read up on sprintf when I'm next back. Thank you for the help, the tips and the heads-up! :)
I told myself I would learn on the structure of a game, as it provides me with (what I hope) is mainly what I will be using with php & mysql. General register/login/logout, general account stuff and nothing too complicated (I say complicated after this embarrasment :P).
And as for a sneak preview- there really is nothing, my design is somewhat limited and because I'm new(ish) there's no functionality :)
|All times are GMT. The time now is 10:25 AM.|
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0