Page 1 of 1

Need of a Little Help

Posted: Wed Feb 18, 2004 11:09 am
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.

Posted: Fri Feb 20, 2004 11:51 am
by Vicious
anyone?

Posted: Fri Feb 20, 2004 11:54 am
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...
}

Posted: Sat Feb 21, 2004 1:29 pm
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;


?>

Posted: Sat Feb 21, 2004 1:37 pm
by markl999
{include normal.php}; <--- don't need the ;