Old 27-05-2008, 18:47   #1 (permalink)
jesusfreak101
ie must die
 
jesusfreak101's Avatar
 
Join Date: Jun 2007
Location: Washington
Posts: 853
Send a message via AIM to jesusfreak101
php echo

how would i go about creating a page that would reveal all of the tables info in a Database. Say in a members site, all of their info that they have provided. I have all of their data (Name, Address, Phone, Email etc) in tables and I wanted to create a list of all of them on a web page but didnt' know how to go about it or what word to use...anyone know?
  Reply With Quote
Old 27-05-2008, 18:52   #2 (permalink)
Paul
Junkie[scum]
 
Paul's Avatar
 
Join Date: Oct 2006
Location: location, location
Posts: 1,863
  Reply With Quote
Old 27-05-2008, 19:34   #3 (permalink)
.sleep
Senior Member
 
.sleep's Avatar
 
Join Date: Mar 2007
Location: california
Posts: 319
Send a message via AIM to .sleep
you need an sql query and then you can either echo specific fields or like karloff said, run a foreach.
  Reply With Quote
Old 27-05-2008, 22:44   #4 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,340
SELECT * FROM users?
  Reply With Quote
Old 28-05-2008, 01:08   #5 (permalink)
Shiro
shiro
 
Shiro's Avatar
 
Join Date: Aug 2007
Location: Yokohama, Japan
Posts: 3,066
Code:
$user_db_data = mysql_query("SELECT name, email, phonenumber, etc FROM users"); while($user_data = mysql_fetch_array($user_db_data)) { echo $user_data['name']; echo $user_data['email']; echo $user_data['phonenumber']; }

It's a skeleton script with lots missing, but it should give you the basic idea of what you need.
__________________
This space for rent.

Dads Japan
After Hours Japan
  Reply With Quote
Reply



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

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8