Page 1 of 1

Setting up an avatar script???

Posted: Tue Mar 16, 2004 11:02 am
by Joe
Recently I have being trying to develop a sign up script that allows you to choose an avatar from a small selection list. When the user likes that avatar they simply check that box but the part I am clueless to is how to identify the location of that avatar using PHP for putting into the mySQL database for future use. Below is a small sample of the avatar list:

<td bgcolor="#FFFFFF"><input type="radio" name="avatar" value="1" /><img src="pics/avatars/avatar2.jpg" width="70" height="70" alt="Peace" border="0" /></td>
<td bgcolor="#FFFFFF"><input type="radio" name="avatar" value="1" /><img src="pics/avatars/avatar3.jpg" width="70" height="70" alt="Artist" border="0" /></td>
<td bgcolor="#FFFFFF"><input type="radio" name="avatar" value="1" /><img src="pics/avatars/avatar4.jpg" width="70" height="70" alt="Freedom" border="0" /></td>


Please help???

Regards


Joe 8)

Posted: Tue Mar 16, 2004 11:07 am
by patrikG
It shouldn't be too difficult to modify the script at viewtopic.php?t=16746

Re: Setting up an avatar script???

Posted: Tue Mar 16, 2004 2:31 pm
by d3ad1ysp0rk

Code: Select all

<td bgcolor="#FFFFFF"><input type="radio" name="avatar" value="2" /><img src="pics/avatars/avatar2.jpg" width="70" height="70" alt="Peace" border="0" /></td>
<td bgcolor="#FFFFFF"><input type="radio" name="avatar" value="3" /><img src="pics/avatars/avatar3.jpg" width="70" height="70" alt="Artist" border="0" /></td>
<td bgcolor="#FFFFFF"><input type="radio" name="avatar" value="4" /><img src="pics/avatars/avatar4.jpg" width="70" height="70" alt="Freedom" border="0" /></td>
then just enter value for the SQL value.. and call it as
<img src="avatars/avatar . $avpath . ">

you could also make it so they can enter a path to one also (their server), but you'd need to add a few things and just print out $avpath and not avatars/avatar$avpath