Get info about of my table

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Darkside
Forum Commoner
Posts: 43
Joined: Wed Oct 30, 2002 4:18 pm

Get info about of my table

Post by Darkside »

I'm a n00b :lol:

I got a users database. You got
ID
Name
Password
Email varchar
Team varchar(30)
PRIMARY KEY (ID),
UNIQUE KEY Name (Name)

I got a join page and it adds in all the data and i've even got a login page where it checks the name and password however is there a way to echo out the intro a the set logged in person? Eg Hello $Name, Your in Team $team. All emails hav been sent to $Email

I'm total lost i hav found ways so echo out the whole a arry but i only want to echo out for the loggin user.
SBukoski
Forum Contributor
Posts: 128
Joined: Wed May 21, 2003 10:39 pm
Location: Worcester, MA

Post by SBukoski »

Well, let's assume you are using a variable called $this_row to store the information retrieved from the database. And assuming, of course, that you are only retrieiving one row of data for the current user signed in, you could try:

Code: Select all

echo "Hello $this_row[Name], Your in Team $this_row[Team]. All emails hav been sent to $this_row[Email]";
Post Reply