singlerec("select * from register where id='$userid'"); $name=ucwords($userinfo['name']); $bank_sts=$userinfo['update_status']; $username=substr($name, 0, strrpos($name, ' ')); $userprofile=$userinfo['img']; $useremail=$userinfo['email']; $aut_user_profileid=$userinfo['userprofile_id']; $First_pro_cnt=$userinfo['product_count']; $spon_ids=$userinfo['sponsor_id']; $cartTot = $db->singlerec("select sum(tot_price) as tot from cart where user_id='$userid' and order_status=0"); $cart_amt = $cartTot['tot']; $cartCt = $db->singlerec("select count(*) as tot from cart where user_id='$userid' and order_status=0"); $cart_count = $cartCt['tot']; } $link = basename($_SERVER['PHP_SELF']); $cart_amt = isset($cart_amt)?$cart_amt:''; ?>