Miku Posted April 25, 2009 Share Posted April 25, 2009 Hi, could some one help me with this? I need a way so when members register and go into there member.php (User CP) page they can add an avatar via URL only. If they add this avatar then they will see there image on the left side off the screen. How can I do this? I need the full script as I am a full noob..... -Thanks Quote Link to comment https://forums.phpfreaks.com/topic/155587-avatar-how-to/ Share on other sites More sharing options...
Prismatic Posted April 25, 2009 Share Posted April 25, 2009 We won't give you the full script. You need to make an attempt or you'll never learn. How much of your system is done sofar? And how is your database structured? Quote Link to comment https://forums.phpfreaks.com/topic/155587-avatar-how-to/#findComment-818841 Share on other sites More sharing options...
trq Posted April 25, 2009 Share Posted April 25, 2009 I need the full script as I am a full noob..... You won't get the full script here, defeats the purpose of the board. I'll you need do is, when your user registers, store the address of there avitar allong with there username, then, you simply need to display it back from the database. Quote Link to comment https://forums.phpfreaks.com/topic/155587-avatar-how-to/#findComment-818843 Share on other sites More sharing options...
mikesta707 Posted April 25, 2009 Share Posted April 25, 2009 Im not gonna give you the full script... but I can give you an idea of what you want to accomplish basically you want to store the URL in your database, as thorpe said, and when you want to display it, get the url via a mysql query, like: $query = mysql_query("SELECT * FROM tablename WHERE criteria='$credientials");//criteria and credentials are basically what you use to validate that its the specific user when they login. Using something like their session username is a good thing to use here $r = mysql_fetch_assoc($query); $url = $r['avatar']; echo "<img src='$url' />"; hope that helps Quote Link to comment https://forums.phpfreaks.com/topic/155587-avatar-how-to/#findComment-818872 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.