NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page PHP/MySQL programming?

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
5 members in live chat ~  


Reply
 
LinkBack Thread Tools
Old 10-22-2010, 11:14 AM THREAD STARTER               #1 (permalink)
First Time Poster!
Join Date: Oct 2010
Posts: 1
sonjeriff is an unknown quantity at this point
 



PHP/MySQL programming?


hi , ive made a member profile page and i want to grab the member data from the mysql table and display it on the page.

i want to grab the data from the row associated with the member logged in.

thanks.
__________________
7zip download
sonjeriff is offline   Reply With Quote
Old 10-23-2010, 05:15 PM   #2 (permalink)
Tech Support
Join Date: Mar 2005
Posts: 4,944
Eric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatness
 

Member of the Month
MOTM September 2005
Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Animal Rescue Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Baby Health Cancer Alzheimer's Protect Our Planet Cancer Survivorship SIDS Child Abuse Diabetes Protect Our Planet Multiple Sclerosis Autism Adoption Special Olympics
Well, it would depend on the structure of your database and how you're getting the member's id and/or username (however you check if they're logged in).
Eric is offline   Reply With Quote
Old 11-03-2010, 02:49 PM   #3 (permalink)
NamePros Regular
Join Date: Aug 2009
Posts: 313
Obulus is an unknown quantity at this point
 



Maybe looking into arraying the row that is assigned to the user logged in?
__________________
Available for hire.
Obulus is offline   Reply With Quote
Old 11-03-2010, 04:59 PM   #4 (permalink)
NamePros Regular
 
BuLLDoG's Avatar
Join Date: Aug 2003
Location: England
Posts: 934
BuLLDoG is a glorious beacon of lightBuLLDoG is a glorious beacon of lightBuLLDoG is a glorious beacon of lightBuLLDoG is a glorious beacon of lightBuLLDoG is a glorious beacon of light
 



you need a function to grab a id of the profile such as:

$id=$_GET['id'];

then a WHERE clause in your SQL statement, something like:

SELECT * FROM members WHERE id = '$id'

Something along those lines
__________________
Free iPhone | Free Facebook Likes
BuLLDoG is offline   Reply With Quote
Old 11-26-2010, 09:06 AM   #5 (permalink)
New Member
Join Date: Nov 2010
Posts: 2
hhelen is an unknown quantity at this point
 



Looks like the OP has found a solution to their database problem.
hhelen is offline   Reply With Quote
Old 11-26-2010, 06:23 PM   #6 (permalink)
New Member
Join Date: Nov 2010
Posts: 4
rickmci is an unknown quantity at this point
 



Originally Posted by BuLLDoG View Post
you need a function to grab a id of the profile such as:
????: NamePros.com http://www.namepros.com/programming/683498-php-mysql-programming.html

$id=$_GET['id'];

then a WHERE clause in your SQL statement, something like:

SELECT * FROM members WHERE id = '$id'

Something along those lines
This is exaaclty right. However, you will need to know what user is logged in in the first place and there are several ways to do that. id will = the user id assigned in you web page to the currently loged on user.
__________________
Affiliate Marketing Blog
rickmci is offline   Reply With Quote
Old 11-29-2010, 10:59 PM   #7 (permalink)
New Member
Join Date: Aug 2010
Location: US
Posts: 21
stevemack is an unknown quantity at this point
 



also it depends on the structure of the db. i think BollDog has come up with the solution.
stevemack is offline   Reply With Quote
Old 12-01-2010, 09:58 AM   #8 (permalink)
First Time Poster!
Join Date: Aug 2008
Posts: 1
trukin is an unknown quantity at this point
 



Originally Posted by BuLLDoG View Post
you need a function to grab a id of the profile such as:

$id=$_GET['id'];

then a WHERE clause in your SQL statement, something like:

SELECT * FROM members WHERE id = '$id'

Something along those lines

????: NamePros.com http://www.namepros.com/showthread.php?t=683498
Make sure you use something like PDO or mysql_escape_string when using raw user input. You don't want to be dealing with SQL Injections.
trukin is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for PHP/MySQL Programming Work Cyphix Developers For Hire 4 04-22-2007 12:33 PM
Basic Introduction to Programming - Vocab Rudy Webmaster Tutorials 1 08-23-2005 06:08 PM
PHP/MySQL Programming Project - Earn MID $xx PolurNET Web Development Wanted 0 06-28-2005 08:43 AM
Help needed with personal project. PHP/MySql programming and layouts! QBert Website Development 3 11-09-2004 10:52 AM

 
All times are GMT -7. The time now is 02:39 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger