$sqlUpdate ='';
if($_REQUEST['txtuser']!='')
{
$txtuser = $_REQUEST['txtuser'];
$sqlUpdate .= ' userName="'.$txtuser.'" ';
}
if($_REQUEST['txtpass'] !='')
{
if($sqlUpdate!='') $sqlUpdate.=', ';
$txtpass = $_REQUEST['txtpass'];
$sqlUpdate .= ' userpass="'.$txtpass.'" ';
}
if($_REQUEST['txtfname'] !='')
{
if($sqlUpdate!='') $sqlUpdate.=', ';
$txtfname = $_REQUEST['txtfname'];
$sqlUpdate .= ' userfname="'.$txtfname.'" ';
}
if($_REQUEST['txtlname'] !='')
{
if($sqlUpdate!='') $sqlUpdate.=', ';
$txtlname = $_REQUEST['txtlname'];
$sqlUpdate .= ' userlname="'.$txtlname.'" ';
}
$sqlUpdate .= 'where userName="'.$_SESSION['username'].'" and usersts="1" ';
$sqlupdatequery = 'update userres set '.$sqlUpdate;
Comments
Post a Comment