0

I have one table ( members ) and five columns ( username , password , FirstName , LastName , Email )

I need to get the Email for the user admin. How would this be done?

2 Answers 2

1
SELECT Email FROM members WHERE username = 'admin';
Sign up to request clarification or add additional context in comments.

2 Comments

Ok. I think this is working, but how would I display the address on the page?
You have to execute the query and assign the result to a variable. There are the mysql_query set of functions, but the best option is to use PDO. This is an excellent resource: phpro.org/tutorials/Introduction-to-PHP-PDO.html
0

Do you know what the username is of the admin? If so you can do the following:

SELECT `Email`
FROM `members`
WHERE `username` = {$username}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.