squires Posted December 19, 2007 Share Posted December 19, 2007 We just got done setting up our forums, and have all the appropriate options turned to yes to allow the user to upload/link to an avatar as well as size constraints on it. We also have an option for the user to choose one of our avatars from the avatar gallery, but it's currently empty. How to I put images in there to use? Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 19, 2007 Share Posted December 19, 2007 Put all the images you want to be in the drop/list menu in a database table called `board_avatars`, and insert all the images into a directory, and their names in the database table Board_avatars/ edit: <?php echo '<select name ="default_avatars">'; while($row = mysql_fetch_array(mysql_query("SELECT * FROM `board_avatars` ")){ echo '<option value ="'.$row['filename'].'">'.$row['filename'].'</option>'; } echo '</select>'; ?> Quote Link to comment Share on other sites More sharing options...
squires Posted December 19, 2007 Author Share Posted December 19, 2007 Thanks, I'll give it a shot. 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.