Pages: [1]   Go Down
Author Topic: PHP and MySQL paping  (Read 681 times)
IppoX
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 1


« on: February 28, 2010, 11:57:11 AM »

Hi everyone.
I need some help to somehow make a list of people and then be able to click on the name of the person to show information for that person.
Right now i'm using 2 files for the listing - database.php and peoplelist.php


database.php - Attached
peoplelist.php - Attached


- Anyone that can help me out?

* database.php.txt (0.11 KB - downloaded 13 times.)
* peoplelist.php.txt (0.56 KB - downloaded 15 times.)
Report to moderator   Logged

TomSayer
Jr. Member
**

Karma: +0/-0
Offline Offline

Posts: 14


« Reply #1 on: March 16, 2010, 06:24:37 AM »

You basically have it correct already.
Code:
while($row = mysql_fetch_array($query))  {

echo "<tr>";
echo "<td>".$row['name']."</td>";
echo "</tr>";
  }
Thats doing all the work you need for what you want. Just change whats in the td to include a link (<a href=''>) and pass the users ID as a get variable to a script which will load that users info!
Report to moderator   Logged

RoseKnight
Sr. Member
****

Karma: +0/-0
Offline Offline

Posts: 52


« Reply #2 on: March 19, 2010, 10:05:05 AM »

What is your problem? You just kinda gave us code without telling us whats going on.
Report to moderator   Logged

Pages: [1]   Go Up
Print
 
Jump to:  

Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC | Theme Kani By Fussilet

Page created in 0.033 seconds with 20 queries.