Jump to content
MakeWebGames

Recommended Posts

Posted

I am trying to re do one I found on here :-)

I have done well so far but I am having trouble putting a default picture up for users who have not picked one.

I tried to use a bit from another profile :

 

alt='User Display Pic' title='User Display Pic' />

</center>";

}

else

{

print "<center>[img=http://i38.tinypic.com/29bh8d5.jpg]</center>

";

}

print "<table width=85% cellpadding=3 class='table' border='0'><div align=center>

 

But it does not work for me or maybe I did not place it in the right place.

Can someone help me out please.

I will post up the bit I want to change.

 

<TD ROWSPAN='6' STYLE='width:80px;align:right;'>
[img={$r[]</A>
<CENTER>{$r['username']}</CENTER>                                            </TD>

 

 

Any help would be great

Posted

Re: Can I have some help with users profiles?

This is what i use:

if($r['display_pic'])
{
print "[img={$r[]";
}
else
{
print "[img=pictures/nopic.jpg]";
}

 

If the display_pic field is left blank then it goes back to default. change src of the default one

Posted

Re: Can I have some help with users profiles?

I think this would work for you.

 

$pic = !$r['display_pic'] ? ("<center>[img=http://i38.tinypic.com/29bh8d5.jpg]</center>

") : ("<center>[img=".$r[]</center>

");

echo $pic;

 

The echo $pic; is the display of it. so put that where you want it displayed.

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...