Thread: PHP in a link?
View Single Post
  #8  
Old 01-31-2009, 08:54 AM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 18,089
BMR777 is on a distinguished road
Default RE: PHP in a link?

If you want to use the ID number, you have to use this code before your link to convert the username to its id number:

PHP Code:
$query "SELECT * FROM users WHERE username = '".$username."'";
$result mysql_query($query);
$num mysql_numrows($result);

//Loop out code
$i=0;
while (
$i 1) {

$id=@mysql_result($result,$i,"uid");


$i++;

Brandon
Reply With Quote