Hi,i create in ownercp an option to update user information from ibwf_xinfo but dont work,can anybody give me some ideas or help coding?It something like this:
-----
ownercp.php
-----
else if($action=="user_xinfo")
{
if($mime== WEB)
{
echo webhead($uthm,$stitle);
$goodhabits= mysql_fetch_array(mysql_query("SELECT goodhabitsFROM ibwf_xinfo WHERE id='".$who."'"));
$badhabits = mysql_fetch_array(mysql_query("SELECT badhabits FROM ibwf_xinfo WHERE id='".$who."'"));
echo "<form action=\"ownerproc.php?action=uprof&ses=$ses&a mp;who=$who\" method=\"post\">";
echo "Goodhabits: <input name=\"ghabits\" maxlength=\"15\" value=\"$goodhabits[0]\"/>
";
echo "Badhabits: <input name=\"bhabits\" maxlength=\"100\" value=\"$badhabits[0]\"/>
";
echo "<input type=\"submit\" value=\"Update\"/>";
echo "</form>";
echo webfoot();
}else{
echo waphead($stitle);
etc etc etc etc.....
echo wapfoot();
}
}
-----
ownerproc.php
-----
bla bla bla the update thing
-----
ownercp.php
-----
else if($action=="user_xinfo")
{
if($mime== WEB)
{
echo webhead($uthm,$stitle);
$goodhabits= mysql_fetch_array(mysql_query("SELECT goodhabitsFROM ibwf_xinfo WHERE id='".$who."'"));
$badhabits = mysql_fetch_array(mysql_query("SELECT badhabits FROM ibwf_xinfo WHERE id='".$who."'"));
echo "<form action=\"ownerproc.php?action=uprof&ses=$ses&a mp;who=$who\" method=\"post\">";
echo "Goodhabits: <input name=\"ghabits\" maxlength=\"15\" value=\"$goodhabits[0]\"/>
";
echo "Badhabits: <input name=\"bhabits\" maxlength=\"100\" value=\"$badhabits[0]\"/>
";
echo "<input type=\"submit\" value=\"Update\"/>";
echo "</form>";
echo webfoot();
}else{
echo waphead($stitle);
etc etc etc etc.....
echo wapfoot();
}
}
-----
ownerproc.php
-----
bla bla bla the update thing
Comment