Ejemplo n.º 1
0
             $sth->bindValue("my_id", $myid);
             try {
                 $sth->execute();
             } catch (Exception $e) {
             }
         } else {
             $sql = "update connect set status=1 where user_id2=:uid and user_id1=:my_id";
             $sth = $conn->prepare($sql);
             $sth->bindValue("uid", $uid);
             $sth->bindValue("my_id", $myid);
             try {
                 $sth->execute();
             } catch (Exception $e) {
             }
         }
         $data = DataClass::get_details($uid, $code);
         if ($data) {
             $success = '1';
             $msg = "Result Found";
         } else {
             $success = '0';
             $msg = "No Result Found";
         }
     } else {
         $success = '0';
         $msg = "No Result Found";
     }
 } else {
     $success = '0';
     $msg = "Invalid User";
 }