gameratheart
Aug 27 2006, 01:51 AM
| | As part of a web-game on my site, I have a php form that requires people to enter their username, and information about the characters they want to have in the game. All this information is stored into a MySQL table. I want the players to be able to visit a page where every character they have registered with their username can be seen.
My question is simply, how can I check the values of the MySQL data, and act accordingly? What I need to do is check for a Username and a character number, and if it finds it, takes the data in that part and acts on it, eg. by showing the picture of the character and the information they gave about it.
Does anyone know how I can do this?
|
Reply
ghostrider
Aug 27 2006, 02:36 AM
You can do this by counting the number of user names and then using a select query. I can help you out with this if you want.
Reply
gameratheart
Aug 27 2006, 02:52 AM
Well I was kind of thinking, use a select query that searches for the username and the character number, then somehow use the selected data. If you can help me with this, ghostrider, it would be much appreciated.
Reply
MaineFishing45
Aug 27 2006, 02:55 AM
So you want a page that displays the SQL information (its values) into something graphical? So pretty much you want a Profile or Registered users page? Umn.... give me some time to reseach that, but in the mean time ask GhostRider. Also if you want to find the values, just login to Cpanel and find PHPMyAdmin and that should tell you.
Reply
gameratheart
Aug 27 2006, 03:10 AM
Well... in effect it is a profile page, because it is a page showing what a user has, but it isn't really talking about the user. QUOTE Also if you want to find the values, just login to Cpanel and find PHPMyAdmin and that should tell you. Talk about stating the bloody obvious! (Sorry, that was uncalled for, but I think I've already demonstarted that I know how to get MYSQL data - I just don't know how to use it)
Reply
rvalkass
Aug 27 2006, 08:44 AM
Your best option will be to write a select query for all rows featuring the current logged-in user's name. The use mysql_fetch_array to get an array of data. If you use a while loop to cycle through the array you can print out the character number or whatever, or use the data as variables to look up an image or other information. I can help as well if you want, either via PM, email or IM (check my profile). I use MySQL a lot and have a few examples of how to use mysql_fetch_array.
Reply
gameratheart
Aug 28 2006, 03:09 AM
The more help I get, the better. You're methods are making sense, but I can't seem to put two and two together and come up with something productive.
Reply
Similar Topics
Keywords : check, mysql, info, act, content
- Agent-principal Relationships
some info on this important subject (0)
Plants And Water Loss
some info on growing plants in dry conditions (0) Transpiration is a plant’s loss of water, usually through the stomates of leaves. Plants have guard
cells to regulate the water loss. These guard cells open and close the stomates in response to
various environmental conditions; darkness, lack of water within the plant, and extreme temperatures
cause the guard cells to close the stomates while light, plentiful water, and favorable temperatures
cause them to open the stomates. Some stomates must be open even in unfavorable conditions so that
the plant can take in carbon dioxide. Dryland farming is the growing of crops....
Enzymes And Health
Some interesting info on enzymes (0) Enzymes act as catalysts in living organisms which allow important chemical reactions to occur at
lower temperatures. They are not altered in the process and can be used in many reactions. Most of
the chemical reactions that occur in living organisms are regulated by enzymes and would happen much
slower without them. For example, without the digestive enzyme carboxypepdidase, it would take
seven years to digest a hamburger. Ethyl carbamate is a compound found in fermented beverages that
can cause cancer in various organisms. Its precursor is urea, an intermediate du....
How Do I Find My Mysql Password? [resolved]
Cannot access my MySQL (5) After all the recent problems, my account has been restored. I have setup my parked domain agin, and
that works fine. However, I can no longer access my MySQL databases (I can from PHPMyAdmin, but
that's all). I had to create a new user for my databases, and created the user with exactly the
same username and password I had before, but some of my web pages do not let me access the pages I
have associated with my databases. Where could i find out what my DB password is? (Although I am as
good as sure I am using the right one). I have tried my old password, the new c....
Please Explain Me Mysql
How do i insert information into this config: (4) Hi, I wanted to try just to test how can i connect my website to another mysql server, but i have no
idea how to insert the other mysql information such as port and host etc.... so here is the config
file please give me an example CODE <?php // mySQL information $server =
'FRESHSQL.COM:3306'; // MySql server $username =
'vasilevich'; // MySql Username $password =
'*******'; // MySql Password $database =
'vasilevich'; // MySql Da....
Remote Access Mysql
(8) Is it possible to directly access my local database from my website? For example, if somebody
submits info on my website, the info they submitted would be transferred to my local database
directly. Is that possible? And if so, how do I set that up? The reason I don't want to upload
my database to my subdomain is because it would be difficult to keep the website database and my
local database in sync . . . or is there a way to do that? Thanks for any replies.....
Motorola Rizr Z3
the new Cell phone ( Check out ) (0) Motorola RIZR Z3 Cell Phone
After the RAZR comes RIZR (for riser). The all-new Motorola RIZR Z3 was showcased in
Cape Town, South Africa. Also known as the Capri, the Z3 is available in a slider form-factor
boasting quad-band GSM and EDGE support.
The phone has Bluetooth capability, and a nice addition is the A2DP (advanced
audio distribution profile) thrown in - you can conveniently use a wireless stereo headset w....
Dreamweaver Cs3: How To Link Content To Layers/apdivs
(4) Hi all! I've been searching the internet like crazy but just can't find any answers to
my problem. I want to make it so that my navigation buttons links content to be loaded inside a
smaller layer/apDiv or perhaps something i've yet to discover. I just can't for my life
understand how to do this nor what tools and options to use. I am using Dreamweaver CS3 in design
mode and have no clue how to hard code in html, CSS etc.. Here's a picture of what i want to
do. I really hope someone can help me or perhaps atleast point me in the right direction....
Rate An Operating System!
I need this info for my comic strip. (0) I have a very irregular comic strip that I make, and I want my next strip to be in the spirit of
XKCD's comic "f--- grapefruit", and rate operating systems instead. I'm running a poll
here, based on whether people think an operating system is better than Windows 2000 or not, which
I'm going to use as a benchmark (sea-level point) for rating systems. The rating system is on 3
axes, "usefulness", "reliability", and "security". Basically, for the poll, check which ones you
think are more useful than Windows 2000 on the first poll, which ones are more reliable ....
Create Table - Mysql Code - Help
(1) I need your feedback about setting the database issues. Please, review them and correct some entries
in the code if they got some mistakes. This is the code itself: SQL CREATE TABLE
`news` ( `id` int(250) NOT NULL auto_increment, `title` varchar(255)
NOT NULL default '', `text` text NOT NULL, `author` varchar(255) NOT
NULL default '', `valid` varchar(255) NOT NULL default '',
`date` varchar(255) NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE = ....
Reset My Site Pelase
read for more info (6) Can you just reset my cpanel / website FTP and all to how it was when I got it new please? Don't
change any passwords, just make it so it's like brand new again. thanks --why? because I have
some files in public_HTML that I am trying to delete even after I give it 777 it says permission
denied so please reset /smile.gif" style="vertical-align:middle" emoid=":)" border="0"
alt="smile.gif" />....
Mysql Error
(3) ok i need some more help from the wonderful coders here at Trap. I'm almost done with my CMS
script, but i'm having a problem with the installer.php file, when it trys to inseret the user
data into the database i keep getting the following error: CODE mySQL Error: You have an
error in your SQL syntax; check the manual that corresponds to your MySQL server version for the
right syntax to use near ';INSERT INTO `members` (`id`, `name`,
`username`, `password`, `email`, `title`) ' at lin....
Mysql
Several files in one field. (2) Hi guys. I want t know if it is posible to have so many entries for one object in a field in MySQL.
I know my question may not be clear because I lack in terminology but pliz try and help. What I want
to do is for axample have a database of my clients with the following fields for every client:
fname, lname, more than one photos, contrubutions(comments, jokes, testimonials posted) etc. I want
to have the things like the photos in the same field but they have to be unique so that my php code
can deal with them individually llike they are coming from different fields.....
Sections And Content
Help please? (3) I do not know how to edit the content and add more pages to my website. Can somebody please help me?....
Html Form!
Using MySQL?! (4) Hey, I need your help again! I need some good working tutorial how I can update my SQL through
HTML form. I did use some tutorials online found with the help of google; but they do not work
properly; I mean there are still small mistakes. I need to have a good tutorial to follow. It
should be based on security and more things. It has to be done in proper way.......
Prostate Check?
The good old glove (6) I am 14, and I was wondering what peoples experiences with the Prostate check up are. I am not
really that thrilled about having someone stick there finger in my Gluteius maximus, but what was it
like for all of you guys out here. I have not liked going to the doctor ever since my female doctor
put her hands down "there" and felt around and said "Does that tickle" when I was little, so as you
can see, I don't have good experiences.....
Mysql-essential-5.0.51 Installion Problem
please help me.(urgent) (2) Dear friend, please help me. Iam working on php project (matchmaking site). I have downloaded mysql
essensial 5.0.51. When i was installing mysql 5.0.51, i got following error - Error 1901: Error
attempting to read from the source installation database:
c:\windows\installer\527ec6.msi What is solution of this problem ? Iam using
windows xp professional version 2002 (service pack 2). Please post your reply. Iam waiting for your
answer. ....
Database With Mysql++
getting mySQL++ to work with trap17 (7) Hi, I'm trying to build an online game and figured the easiest way to do the server list would
be to make a mySQL database for it; however, I use the con() command on the IP i get from pinging my
website and I always get an abnormal program termination; however, it will work with the mySQL on my
own machine. The code is below: CODE #include <iostream> #include <iomanip>
#include <mysql++> #include "pass.h"//holds my password (i program at
school) int main(void) { Connection con("t3jem3_test","....
Tools Needed!
PHP & MySQL (9) Hello, everyone! I need some tools for those two things to test PHP scripts coming together with
database on my laptop, instead checking them on a web-server which takes time.....
Tray Info Message
Kind of popup thingie (7) Hi! I'm doing VB for some time now and for last two days I've been looking for a
tutorial which would show me how to create some kind of notification that would pop up from
lower-right side of my screen, where the clock is... you know, just like.. when a contact comes
online on MSN etc. I realized that there's no way to make a balloon pop up like the one in the
image but is there a way to make anything like that..it doesn't have to be a balloon. A little
square in the right spot would be good as well /tongue.gif" style="vertical-align:middle" emoid....
Mysql + Php Question
(5) Hi, I am creating a website in php and using a mysql database to store the data. I want to store
time data in the database. My question is what is the best datatype I should use and how do I read
the time from the database and format(display) it using php ?....
Mysql Won't Update
(4) Ok, so I'm making some arcade administration software so I don't have to add games the hard
way, well anyway, one of the features I have is that on the homepage is a featured author and as
such I just have it so it updates one line in the mySQL. Well, the page with the form passes on the
varibles fine and the updating page recieves them because I echoed everything, then I build the
query and I even echo the query and it comes out exactly how I want it to, but for some reason, the
database itself won't update even though all the varibles are there. Here's....
Call Of Duty 4
This is my info about Cod4 (8) My Cod4 Review I picked up COD4 kinda hoping for something not like COD and COD2. Both
previous encounters with the COD franchise were very enjoyable indeed, but the element of a cohesive
storyline was missing. You were bounced between Russian, English, and American campaigns trying to
follow each smaller storyline to the end. Boy was I pleasantly surprised with COD4. Blown away is
more like it. The plot of the game was very well done. The 2 story lines seemed to be going in 2
different directions at first, but later on you can see the 2 slowly merging in t....
Check This Totally Css Site Out
(5) Check out this and give me ur opinion www.eskiotongroup.com....
Is It Possible To Access The Mysql Remotely?
(10) I like to experiment with a lot of things and I was thinking of making a sort of instant messenger
in Python, but I want to let people have actual accounts so I need to be able to access the mySQL
remotely. If that's not possible, are we allowed to run Python scripts on the server?....
Check Referrer To Prevent Linking Yours From Other Sites
Check referrer with Php and Mysql (8) Check Referrer Using Php To Prevent People Linking To Your Downloads From Other Sites Ever
find that found some people are listing items, images and tuts and linking directly to the download
url (those that are like my photoshop tutorial.php?id=0), which is a .php to count the number of
downloads. To prevent this, you can add a piece of code to the download pages that checks which page
referred them to the download page: if it's my domain, it downloads the file normally, if
it's not, it will redirect to my home page instead. Important : Not all browser....
Dell Tech Support
I just needed a small bit of info (22) Ok, so I got my aunt's old Dell Inspiron 8000 laptop. She also gave me a wireless card with it,
but I had to promise her that I wouldn't connect to the Net until I reinstalled Windows. I
needed to open the BIOS Setup program to change the boot order of the DVD-ROM drive, but I just
couldn't figure out how (even hitting Fn+F1, where F1 is marked setup, didn't work, and I
tried about half a dozen other key combonations, which also failed to work). So this morning I
called Dell, with hopes of getting my problem solved. The crazy lady whose accent I couldn....
Mysql Database Size
related to the free database space (6) hi all! this is my first post /biggrin.gif' border='0' style='vertical-align:middle'
alt='biggrin.gif' /> and i have a doubt, how much mysql space i am allowed to use... i mean how
much is available for my free account....
Import From Excel File Into Mysql Database
(7) Has anyone tried using the excel import function that comes with phpmyadmin
http://www.phpmyadmin.net/home_page/ - it does not require any additional plug-ins or scripts and
is fairly straightforward to use. In phpmyadmin, if you click on the database table which you wish
to import the data to , there is a link on the bottom left corner which says "insert data from a
text file into the table" - although it says text file it still can be used to import an excel file.
When you click on this link you will be taken to a page where you will be asked for the file name
(the....
Complete Login System
With PHP + MYSQL (55) Its an complete login sistem made and tested by me and I think itwill be very usefull for people who
are tryn to learn PHP. First, let's make register.php: CODE <?
include("conn.php"); // create a file with all the database connections
if($do_register){ // if the submit button were clicked if((!$name)
|| (!$email) || (!$age) || (!$login) ||
(!$password) || (!$password2)){ print "You can't let
any fields in blank....
Looking for check, mysql, info, act, content
|
|
Searching Video's for check, mysql, info, act, content
|
advertisement
|
|