Need of a Little Help

Looking for volunteers to join your project? Need help with a script but can't afford to pay? Want to offer your services as a volunteer to build up your portfolio? This is the place for you...

Moderator: General Moderators

Post Reply
Vicious
Forum Contributor
Posts: 105
Joined: Fri Jun 20, 2003 12:40 pm

Need of a Little Help

Post by Vicious »

Hey, I'm making a script right now but im stuck on the members page. I have it listing the roster but now I have to learn how to do this http://www.teamx6.com/roster.php and do the http://www.teamx6.com/roster.php?mid=2 If anyone has any tutorials that can do this please send. Also the number will be the id of the person in the database. Any help would be appreciated.
Vicious
Forum Contributor
Posts: 105
Joined: Fri Jun 20, 2003 12:40 pm

Post by Vicious »

anyone?
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Just have each member on the roster link to $_SERVER['PHP_SELF'].'?id='.$member['id'] or however your id is stored.

Then when you click it will take you to, for example, roster.php?id=5
Then just have something like :
if(!empty($_GET['id'])){
$sql = "SELECT details FROM members WHERE id=".$_GET['id'];
$res = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_assoc($res);
//display the details using $row here...
}
Vicious
Forum Contributor
Posts: 105
Joined: Fri Jun 20, 2003 12:40 pm

Post by Vicious »

I did this, I canged the html into includes so its not as long

Code: Select all

<?php
if(!isset($_GET&#1111;"id"]))
&#123;include normal.php&#125;; 

else
&#123;

include "teamprofile.php";

&#125;


?>
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

{include normal.php}; <--- don't need the ;
Post Reply