Ok guys ive being playing around with these codes and stuff but still cant get it to work index.php
$showavatar = mysql_fetch_array(mysql_query("SELECT showavatar FROM ibwf_users WHERE id='".$uid."'"));
if($showavatar[0]=="1")
{
$avlink = getavatar($item[2]);
if ($avlink!=""){
echo "<img src=\"$avlink\" height=\"25\" width=\"25\" alt=\"avatar\"/>";
}else{
echo "<img src=\"/images/nopic.jpg\" height=\"25\" width=\"25\" alt=\"avatar\"/>";
}
}
echo "<small>Show Avatar online?:</small> <select name=\"showavatar\" value=\"$showavatar[0]\">";
if($showshout[0]=="1"){
echo "<option value=\"1\" selected=\"1\">Yes</option>";
}else{
echo "<option value=\"1\">Yes</option>";
}
if($showavatar[0]=="0"){
echo "<option value=\"0\" selected=\"0\">No</option>";
}else{
echo "<option value=\"0\">No</option>";
}
echo "</select><br/><br/>";
genproc.php
$showavatar = $_POST["showavatar"];
$res = mysql_query("UPDATE ibwf_users SET showavatar='".$showavatar."' WHERE id='".$uid."'");
and in sql ive added this
showavatar int 100 default 1
what can i do to make this code work
Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code
NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH