Jump to content
MakeWebGames

Recommended Posts

Posted

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

Posted

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

Posted

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>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...