Homicidal Posted May 5, 2007 Share Posted May 5, 2007 Right now I have it where it shows the userId that you are married to. I am wondering if there is a way to change it where it displays the username instead of the userID Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted May 5, 2007 Share Posted May 5, 2007 Re: Username under Married instead of UserID just quickly $query = mysql_query('select `name` from `users` where `id` = "'.$theirid.'"); $array = mysql_fetch_assoc($query); echo "Marriage: ".$array['name']; just replace it with what everything's actually called Quote Link to comment Share on other sites More sharing options...
Z?v?? Posted May 5, 2007 Share Posted May 5, 2007 Re: Username under Married instead of UserID if ( !$ir['married'] ) { $marital="<font color='red'>No</font>"; } else { $k=mysql_query("SELECT username FROM users WHERE userid={$ir['married']}", $c); $marital="[url='viewuser.php?u={$ir[']".mysql_result($k,0,0)."[/url] "; $marital.="[[url='partner.php']Manage[/url]]"; $mair=mysql_query("SELECT u.*, h.* FROM users u LEFT JOIN houses h ON h.hWILL=u.maxwill WHERE userid={$ir['married']}",$c); $ms=mysql_fetch_array($mair); } if ($ir['married']>0) { $marr=mysql_query("SELECT * FROM users WHERE userid={$ir['married']}",$c); $ma=mysql_fetch_array($marr); <td><p align='left'>[b]Married: $marital[/b]</p></td> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.