Log in

View Full Version : avatars.php?id=id here



dkblackhawk
08-25-2009, 03:24 AM
Ok here it goes.

What code do i have to use so that


<?php if ($current_user->ID) {
$user=get_userdata($current_user->ID);
echo $comment->user_id;
} ?><?php echo get_avatar($current_user->ID,$size='50'); ?>

this code ^^ displays avatars, each id has a different avatar, i am wondering if i have it so that it has avatars.php?id=id here it changes the avatar. What php code do i need? so basically the ID in the link will replace all of the id usage in the above php code.

dkblackhawk
08-30-2009, 06:33 AM
Ok i found something else...

<?php echo get_avatar( $id=ID CONTENT HERE,$size='50'); ?>
so i need to have it so that it goes http://e4g.info/avatarspage.php?id=IDCONTENTHERE and depending on the number for exampe if its ?id=1 the code becomes
<?php echo get_avatar( $id=1,$size='50'); ?>

dkblackhawk
08-31-2009, 03:13 AM
someone help please...

dkblackhawk
09-12-2009, 03:40 PM
please help?

thetestingsite
09-12-2009, 03:56 PM
Try:



<?php echo get_avatar($_GET['id'],$size='50'); ?>


Hope this helps.

JShor
09-13-2009, 01:04 AM
Call $id variable though.



<?php echo get_avatar($id=$_GET['id'],$size='50'); ?>

dkblackhawk
09-14-2009, 12:36 PM
thanks it worked like a charm :P