<?php
//fashionWoman -- Object to store woman fashion selecions for user

date_default_timezone_set('Africa/Johannesburg');

class FashionWoman  {
    
    private $conn;
    private $table_name = "FashionWoman";
 
    // object properties
    public $id;
    public $fkeyUserId;
	public $colorSelectedCategory;
    public $colorSelectedStyle;
    public $colorSelectedColor;
    public $favouriteColors1;
    public $favouriteColors2;
    public $favouriteColors3;
    public $favouriteColors4;
    public $colorSelectedSummary; 
    public $bustSize;
    public $waistSize;
    public $hipSize;
    public $shapeType;
    public $neckLenghtType;
    public $height;
    public $bottomSize;
    public $segmentType;
    public $flawsSaddleBags;
    public $flawsHips;
    public $flawsBreastsTooSmall;
    public $flawsBreastsTooLarge;
    public $flawsLowerLegs;
    public $flawsOverweight;
    public $flawsDoubleChin;
    public $flawsBigButtocks;
    public $flawsStomachLoveHandles;
    public $flawsHollowBack;
    public $flawsArms;
    public $makeupDroopyEyes;
    public $makeupWideEyes;
    public $makeupSmallEyes;
    public $makeupAccentuatedCheekbones;
    public $makeupDarkCircles;
    public $makeupSmallLips;
    public $makeupLargeForehead;
    public $makeupMoreYouthfullLook;
    public $makeupWhenYouWearBlack;
    public $fashionQuizCurrentQuestion;
    public $fashionQuizQ1;
    public $fashionQuizQ2;
    public $fashionQuizQ3;
    public $fashionQuizQ4;
    public $fashionQuizQ5;
    public $fashionQuizQ6;
    public $fashionQuizQ7;
    public $fashionQuizQ8;
    public $fashionQuizQ9;
    public $fashionQuizQ10;
    public $fashionQuizResults1;
    public $fashionQuizResults2;
    public $myFaceLength;
    public $myFaceSide;
    public $myFaceSuggestionType;
    public $lastUpdated1;
    
    
    
    private $emptyData= "0000-00-00 00:00:00";
    
    
     // constructor
    public function __construct($db){
        $this->conn = $db;
    }
    
    
    function isTokenValid(){
     
        // query to check if token exists and is valid
        $query = "SELECT id,FK_AppUser,token,activated_on,expiry_date,duration,created_at,updated_at,created_by
                FROM " . $this->table_name . "
                WHERE token = ? and activated_on = ?
                LIMIT 0,1";
     
        // prepare the query
        $stmt = $this->conn->prepare( $query );
     
        // sanitize
       // $this->email=htmlspecialchars(strip_tags($this->email));
     
        // bind given email value
        $stmt->bindParam(1, $this->token);
        
        $stmt->bindParam(2,$this->emptyData);
     
        // execute the query
        $stmt->execute();
     
        // get number of rows
        $num = $stmt->rowCount();
     
        // if email exists, assign values to object properties for easy access and use for php sessions
        if($num>0){
     
            // get record details / values
            $row = $stmt->fetch(PDO::FETCH_ASSOC);
     
            // assign values to object properties
            $this->id = $row['id'];
            $this->fkeyAppUser = $row['FK_AppUser'];
            $this->token = $row['token'];
            $this->activatedOn = $row['activated_on'];
            
            
            $this->expiryDate = $row['expiry_date'];
            $this->duration = $row['duration'];
            $this->createdAt = $row['created_at'];
             $this->updatedAt = $row['updated_at'];
             $this->createdBy = $row['created_by'];
     
            // return true because email exists in the database
            return true;
        }
     
        // return false if email does not exist in the database
        return false;
    }

    function updateFashion(){
        try{
        
            $query1 = "UPDATE FashionWoman SET 
        `color_selectedCategory`=:colorSelectedCategory,
        `color_selectedStyle`=:colorSelectedStyle,
         `color_selectedColor`=:colorSelectedColor,
         `favouriteColors_1`=:favouriteColors1,
         `favouriteColors_2`=:favouriteColors2,
         `favouriteColors_3`=:favouriteColors3,
         `favouriteColors_4`=:favouriteColors4,
         `color_selectedSummary`=:colorSelectedSummary,
          `bustSize`=:bustSize,
         `waistSize`=:waistSize,
         `hipSize`=:hipSize,
         `shapeType`=:shapeType,
         `neckLengthType`=:neckLenghtType,
         `height`=:height,
         `bottomSize`=:bottomSize,
         `segmentType`=:segmentType,
          `flaws_SaddleBags`=:flawsSaddleBags,
         `flaws_Hips`=:flawsHips,
         `flaws_BreastsTooSmall`=:flawsBreastsTooSmall,
         `flaws_BreastsTooLarge`=:flawsBreastsTooLarge,
         `flaws_LowerLegs`=:flawsLowerLegs,
         `flaws_Overweight`=:flawsOverweight,
         `flaws_DoubleChin`=:flawsDoubleChin,
         `flaws_bigButtocks`=:flawsBigButtocks,
         `flaws_StomachLoveHandles`=:flawsStomachLoveHandles,
         `flaws_HollowBack`=:flawsHollowBack,
         `flaws_Arms`=:flawsArms,
         `makeup_DroopyEyes`=:makeupDroopyEyes,
         `makeup_WideEyes`=:makeupWideEyes,
         `makeup_SmallEyes`=:makeupSmallEyes,
         `makeup_AccentuatedCheekbones`=:makeupAccentuatedCheekbones,
         `makeup_DarkCircles`=:makeupDarkCircles,
         `makeup_SmallLips`=:makeupSmallLips,
         `makeup_LargeForehead`=:makeupLargeForehead,
         `makeup_MoreYouthfulLook`=:makeupMoreYouthfullLook,
         `makeup_WhenYouWearBlack`=:makeupWhenYouWearBlack,
         `fashionQuiz_currentQuestion`=:fashionQuizCurrentQuestion,
         `fashionQuiz_q1`=:fashionQuizQ1,
         `fashionQuiz_q2`=:fashionQuizQ2,
         `fashionQuiz_q3`=:fashionQuizQ3,
         `fashionQuiz_q4`=:fashionQuizQ4,
         `fashionQuiz_q5`=:fashionQuizQ5,
         `fashionQuiz_q6`=:fashionQuizQ6,
         `fashionQuiz_q7`=:fashionQuizQ7,
         `fashionQuiz_q8`=:fashionQuizQ8,
         `fashionQuiz_q9`=:fashionQuizQ9,
         `fashionQuiz_q10`=:fashionQuizQ10,
          `fashionQuiz_Results1`=:fashionQuizResults1,
         `fashionQuiz_Results2`=:fashionQuizResults2,
          `myFace_Length`=:myFaceLength,
         `myface_Side`=:myFaceSide,
         `myface_SuggestionType`=:myFaceSuggestionType

         WHERE `fk_userId`=:fkeyUserId";
         
               // prepare the query
            $stmt = $this->conn->prepare( $query1 );
            $stmt->bindParam(':colorSelectedCategory',  $this->colorSelectedCategory);
            $stmt->bindParam(':colorSelectedStyle',  $this->colorSelectedStyle);
            $stmt->bindParam(':colorSelectedColor',  $this->colorSelectedColor);
            $stmt->bindParam(':favouriteColors1',  $this->favouriteColors1);
            $stmt->bindParam(':favouriteColors2',  $this->favouriteColors2);
            $stmt->bindParam(':favouriteColors3',  $this->favouriteColors3);
            $stmt->bindParam(':favouriteColors4',  $this->favouriteColors4);
            $stmt->bindParam(':colorSelectedSummary',  $this->colorSelectedSummary);
            $stmt->bindParam(':bustSize',  $this->bustSize);
            $stmt->bindParam(':waistSize',  $this->waistSize);
            $stmt->bindParam(':hipSize',  $this->hipSize);
            $stmt->bindParam(':shapeType',  $this->shapeType);
            $stmt->bindParam(':neckLenghtType',  $this->neckLenghtType);
            $stmt->bindParam(':height',  $this->height);
            $stmt->bindParam(':bottomSize',  $this->bottomSize);
            $stmt->bindParam(':segmentType',  $this->segmentType);
            $stmt->bindParam(':flawsSaddleBags',  $this->flawsSaddleBags);
            $stmt->bindParam(':flawsHips',  $this->flawsHips);
            $stmt->bindParam(':flawsBreastsTooSmall',  $this->flawsBreastsTooSmall);
            $stmt->bindParam(':flawsBreastsTooLarge',  $this->flawsBreastsTooLarge);
            $stmt->bindParam(':flawsLowerLegs',  $this->flawsLowerLegs);
            $stmt->bindParam(':flawsOverweight',  $this->flawsOverweight);
            $stmt->bindParam(':flawsDoubleChin',  $this->flawsDoubleChin);
            $stmt->bindParam(':flawsBigButtocks',  $this->flawsBigButtocks);
            $stmt->bindParam(':flawsStomachLoveHandles',  $this->flawsStomachLoveHandles);
            $stmt->bindParam(':flawsHollowBack',  $this->flawsHollowBack);
            $stmt->bindParam(':flawsArms',  $this->flawsArms);  
            $stmt->bindParam(':makeupDroopyEyes',  $this->makeupDroopyEyes);
            $stmt->bindParam(':makeupWideEyes',  $this->makeupWideEyes);
            $stmt->bindParam(':makeupSmallEyes',  $this->makeupSmallEyes);
            $stmt->bindParam(':makeupAccentuatedCheekbones',  $this->makeupAccentuatedCheekbones);
            $stmt->bindParam(':makeupDarkCircles',  $this->makeupDarkCircles);
            $stmt->bindParam(':makeupSmallLips',  $this->makeupSmallLips);
            $stmt->bindParam(':makeupLargeForehead',  $this->makeupLargeForehead);
            $stmt->bindParam(':makeupMoreYouthfullLook',  $this->makeupMoreYouthfullLook);
            $stmt->bindParam(':makeupWhenYouWearBlack',  $this->makeupWhenYouWearBlack);
            $stmt->bindParam(':fashionQuizCurrentQuestion',  $this->fashionQuizCurrentQuestion);
            $stmt->bindParam(':fashionQuizQ1',  $this->fashionQuizQ1);
            $stmt->bindParam(':fashionQuizQ2',  $this->fashionQuizQ2);
            $stmt->bindParam(':fashionQuizQ3',  $this->fashionQuizQ3);
            $stmt->bindParam(':fashionQuizQ4',  $this->fashionQuizQ4);
            $stmt->bindParam(':fashionQuizQ5',  $this->fashionQuizQ5);
            $stmt->bindParam(':fashionQuizQ6',  $this->fashionQuizQ6);
            $stmt->bindParam(':fashionQuizQ7',  $this->fashionQuizQ7);
            $stmt->bindParam(':fashionQuizQ8',  $this->fashionQuizQ8);
            $stmt->bindParam(':fashionQuizQ9',  $this->fashionQuizQ9);
            $stmt->bindParam(':fashionQuizQ10',  $this->fashionQuizQ10);
            $stmt->bindParam(':fashionQuizResults1',  $this->fashionQuizResults1);
            $stmt->bindParam(':fashionQuizResults2',  $this->fashionQuizResults2);
            $stmt->bindParam(':myFaceLength',  $this->myFaceLength);
            $stmt->bindParam(':myFaceSide',  $this->myFaceSide);
            $stmt->bindParam(':myFaceSuggestionType',  $this->myFaceSuggestionType);
            $stmt->bindParam(':fkeyUserId',  $this->fkeyUserId);
            $stmt->execute();
            $affected_rows = $stmt->rowCount();

                 
           // if($affected_rows > 0){
            $requestStatus = "true";
          //  }else{
          //       $requestStatus = "false";
           // }
                   
            
            
        } catch (Exception $e) {
             $requestStatus = "false";
        }
       // $requestStatus = $this->lastUpdated1;
        
        return $requestStatus;
         // query to check if token exists and is valid

    }
    
    function selectFashion(){
         $query ="SELECT * FROM `FashionWoman` WHERE `fk_userId`=:fkeyUserId ";
         $stmt = $this->conn->prepare( $query );
         $stmt->bindParam(':fkeyUserId',  $this->fkeyUserId);
         $stmt->execute();
         $num = $stmt->rowCount();

        if($num>0){
 
            // get record details / values
            $row = $stmt->fetch(PDO::FETCH_ASSOC);
     
            // assign values to object properties
             $this->id = $row['id'];
             $this->fkeyUserId = $row['fk_userId'];
        	 $this->colorSelectedCategory = $row['color_selectedCategory'];
             $this->colorSelectedStyle = $row['color_selectedStyle'];
             $this->colorSelectedColor = $row['color_selectedColor'];
             $this->favouriteColors1 = $row['favouriteColors_1'];
             $this->favouriteColors2 = $row['favouriteColors_2'];
             $this->favouriteColors3 = $row['favouriteColors_3'];
             $this->favouriteColors4 = $row['favouriteColors_4'];
             $this->colorSelectedSummary = $row['color_selectedSummary']; 
             $this->bustSize = $row['bustSize'];
             $this->waistSize = $row['waistSize'];
             $this->hipSize = $row['hipSize'];
             $this->shapeType = $row['shapeType'];
             $this->neckLenghtType = $row['neckLengthType'];
             $this->height = $row['height'];
             $this->bottomSize = $row['bottomSize'];
             $this->segmentType = $row['segmentType'];
             $this->flawsSaddleBags = $row['flaws_SaddleBags'];
             $this->flawsHips = $row['flaws_Hips'];
             $this->flawsBreastsTooSmall = $row['flaws_BreastsTooSmall'];
             $this->flawsBreastsTooLarge = $row['flaws_BreastsTooLarge'];
             $this->flawsLowerLegs = $row['flaws_LowerLegs'];
             $this->flawsOverweight = $row['flaws_Overweight'];
             $this->flawsDoubleChin = $row['flaws_DoubleChin'];
             $this->flawsBigButtocks = $row['flaws_bigButtocks'];
             $this->flawsStomachLoveHandles = $row['flaws_StomachLoveHandles'];
             $this->flawsHollowBack = $row['flaws_HollowBack'];
             $this->flawsArms = $row['flaws_Arms'];
             $this->makeupDroopyEyes = $row['makeup_DroopyEyes'];
             $this->makeupWideEyes = $row['makeup_WideEyes'];
             $this->makeupSmallEyes = $row['makeup_SmallEyes'];
             $this->makeupAccentuatedCheekbones = $row['makeup_AccentuatedCheekbones'];
             $this->makeupDarkCircles = $row['makeup_DarkCircles'];
             $this->makeupSmallLips = $row['makeup_SmallLips'];
             $this->makeupLargeForehead = $row['makeup_LargeForehead'];
             $this->makeupMoreYouthfullLook = $row['makeup_MoreYouthfulLook'];
             $this->makeupWhenYouWearBlack = $row['makeup_WhenYouWearBlack'];
             $this->fashionQuizCurrentQuestion = $row['fashionQuiz_currentQuestion'];
             $this->fashionQuizQ1 = $row['fashionQuiz_q1'];
             $this->fashionQuizQ2 = $row['fashionQuiz_q2'];
             $this->fashionQuizQ3 = $row['fashionQuiz_q3'];
             $this->fashionQuizQ4 = $row['fashionQuiz_q4'];
             $this->fashionQuizQ5 = $row['fashionQuiz_q5'];
             $this->fashionQuizQ6 = $row['fashionQuiz_q6'];
             $this->fashionQuizQ7 = $row['fashionQuiz_q7'];
             $this->fashionQuizQ8 = $row['fashionQuiz_q8'];
             $this->fashionQuizQ9 = $row['fashionQuiz_q9'];
             $this->fashionQuizQ10 = $row['fashionQuiz_q10'];
             $this->fashionQuizResults1 = $row['fashionQuiz_Results1'];
             $this->fashionQuizResults2 = $row['fashionQuiz_Results2'];
             $this->myFaceLength = $row['myFace_Length'];
             $this->myFaceSide = $row['myface_Side'];
             $this->myFaceSuggestionType = $row['myface_SuggestionType'];
             $this->lastUpdated1 = $row['lastUpdated'];
     
            // return true because email exists in the database
           
        }
        return $num;
    }
    
    
    function testQuery(){
        
       $testString = "UPDATE " . $this->table_name . " SET `color_selectedCategory`=" . $this-> colorSelectedCategory . ",`color_selectedStyle`=" . $this-> colorSelectedStyle . ",`color_selectedColor`=" . $this-> colorSelectedColor . ",`favouriteColors_1`=" . $this-> favouriteColors1 . ",`favouriteColors_2`=" . $this->favouriteColors2  . ",`favouriteColors_3`=" . $this->favouriteColors3  . ",`favouriteColors_4`=" . $this->favouriteColors4  . ",`color_selectedSummary`=" . $this->colorSelectedSummary  . ",`bustSize`=" . $this->bustSize  . ",`waistSize`=" . $this->waistSize  . ",`hipSize`=" . $this->hipSize  . ",`shapeType`=" . $this->shapeType  . ",`neckLengthType`=" . $this->neckLenghtType  . ",`height`=" . $this->height  . ",`bottomSize`=" . $this->bottomSize  . ",`segmentType`=" . $this->segmentType  . ",`flaws_SaddleBags`=" . $this->flawsSaddleBags  . ",`flaws_Hips`=" . $this->flawsHips  . ",`flaws_BreastsTooSmall`=" . $this->flawsBreastsTooSmall  . ",`flaws_BreastsTooLarge`=" . $this->flawsBreastsTooLarge  . ",`flaws_LowerLegs`=" . $this->flawsLowerLegs  . ",`flaws_Overweight`=" . $this->flawsOverweight  . ",`flaws_DoubleChin`=" . $this->flawsDoubleChin  . ",`flaws_bigButtocks`=" . $this-> flawsBigButtocks . ",`flaws_StomachLoveHandles`=" . $this->flawsStomachLoveHandles  . ",`flaws_HollowBack`=" . $this->flawsHollowBack  . ",`flaws_Arms`=" . $this->flawsArms  . ",`makeup_DroopyEyes`=" . $this->makeupDroopyEyes  . ",`makeup_WideEyes`=" . $this->makeupWideEyes  . ",`makeup_SmallEyes`=" . $this->makeupSmallEyes  . ",`makeup_AccentuatedCheekbones`=" . $this->makeupAccentuatedCheekbones  . ",`makeup_DarkCircles`=" . $this->makeupDarkCircles  . ",`makeup_SmallLips`=" . $this->makeupSmallLips  . ",`makeup_LargeForehead`=" . $this->makeupLargeForehead  . ",`makeup_MoreYouthfulLook`=" . $this->makeupMoreYouthfullLook  . ",`makeup_WhenYouWearBlack`=" . $this->makeupWhenYouWearBlack  . ",`fashionQuiz_currentQuestion`=" . $this->fashionQuizCurrentQuestion  . ",`fashionQuiz_q1`=" . $this->fashionQuizQ1  . ",`fashionQuiz_q2`=" . $this->fashionQuizQ2  . ",`fashionQuiz_q3`=" . $this->fashionQuizQ3  . ",`fashionQuiz_q4`=" . $this->fashionQuizQ4  . ",`fashionQuiz_q5`=" . $this->fashionQuizQ5  . ",`fashionQuiz_q6`=" . $this->fashionQuizQ6  . ",`fashionQuiz_q7`=" . $this->fashionQuizQ7  . ",`fashionQuiz_q8`=" . $this->fashionQuizQ8  . ",`fashionQuiz_q9`=" . $this->fashionQuizQ9  . ",`fashionQuiz_q10`=" . $this->fashionQuizQ10  . ",`fashionQuiz_Results1`=" . $this->fashionQuizResults1  . ",`fashionQuiz_Results2`=" . $this->fashionQuizResults2  . ",`myFace_Length`=" . $this->myFaceLength  . ",`myface_Side`=" . $this->myFaceSide  . ",`myface_SuggestionType`=" . $this->myFaceSuggestionType  . " WHERE `fk_userId`=" . $this->fkeyUserId  . "";
       
       return $testString;
        
    }
    
    function testUpdate(){
        
        $query1 = "UPDATE FashionWoman SET 
        `color_selectedCategory`=:colorSelectedCategory,
        `color_selectedStyle`=:colorSelectedStyle,
         `color_selectedColor`=:colorSelectedColor,
         `favouriteColors_1`=:favouriteColors1,
         `favouriteColors_2`=:favouriteColors2,
         `favouriteColors_3`=:favouriteColors3,
         `favouriteColors_4`=:favouriteColors4,
         `color_selectedSummary`=:colorSelectedSummary,
          `bustSize`=:bustSize,
         `waistSize`=:waistSize,
         `hipSize`=:hipSize,
         `shapeType`=:shapeType,
         `neckLengthType`=:neckLenghtType,
         `height`=:height,
         `bottomSize`=:bottomSize,
         `segmentType`=:segmentType,
          `flaws_SaddleBags`=:flawsSaddleBags,
         `flaws_Hips`=:flawsHips,
         `flaws_BreastsTooSmall`=:flawsBreastsTooSmall,
         `flaws_BreastsTooLarge`=:flawsBreastsTooLarge,
         `flaws_LowerLegs`=:flawsLowerLegs,
         `flaws_Overweight`=:flawsOverweight,
         `flaws_DoubleChin`=:flawsDoubleChin,
         `flaws_bigButtocks`=:flawsBigButtocks,
         `flaws_StomachLoveHandles`=:flawsStomachLoveHandles,
         `flaws_HollowBack`=:flawsHollowBack,
         `flaws_Arms`=:flawsArms,
         `makeup_DroopyEyes`=:makeupDroopyEyes,
         `makeup_WideEyes`=:makeupWideEyes,
         `makeup_SmallEyes`=:makeupSmallEyes,
         `makeup_AccentuatedCheekbones`=:makeupAccentuatedCheekbones,
         `makeup_DarkCircles`=:makeupDarkCircles,
         `makeup_SmallLips`=:makeupSmallLips,
         `makeup_LargeForehead`=:makeupLargeForehead,
         `makeup_MoreYouthfulLook`=:makeupMoreYouthfullLook,
         `makeup_WhenYouWearBlack`=:makeupWhenYouWearBlack,
         `fashionQuiz_currentQuestion`=:fashionQuizCurrentQuestion,
         `fashionQuiz_q1`=:fashionQuizQ1,
         `fashionQuiz_q2`=:fashionQuizQ2,
         `fashionQuiz_q3`=:fashionQuizQ3,
         `fashionQuiz_q4`=:fashionQuizQ4,
         `fashionQuiz_q5`=:fashionQuizQ5,
         `fashionQuiz_q6`=:fashionQuizQ6,
         `fashionQuiz_q7`=:fashionQuizQ7,
         `fashionQuiz_q8`=:fashionQuizQ8,
         `fashionQuiz_q9`=:fashionQuizQ9,
         `fashionQuiz_q10`=:fashionQuizQ10,
          `fashionQuiz_Results1`=:fashionQuizResults1,
         `fashionQuiz_Results2`=:fashionQuizResults2,
          `myFace_Length`=:myFaceLength,
         `myface_Side`=:myFaceSide,
         `myface_SuggestionType`=:myFaceSuggestionType

         WHERE `fk_userId`=:fkeyUserId";
         
               // prepare the query
            $stmt = $this->conn->prepare( $query1 );
            $stmt->bindParam(':colorSelectedCategory',  $this->colorSelectedCategory);
            $stmt->bindParam(':colorSelectedStyle',  $this->colorSelectedStyle);
            $stmt->bindParam(':colorSelectedColor',  $this->colorSelectedColor);
            $stmt->bindParam(':favouriteColors1',  $this->favouriteColors1);
            $stmt->bindParam(':favouriteColors2',  $this->favouriteColors2);
            $stmt->bindParam(':favouriteColors3',  $this->favouriteColors3);
            $stmt->bindParam(':favouriteColors4',  $this->favouriteColors4);
            $stmt->bindParam(':colorSelectedSummary',  $this->colorSelectedSummary);
            $stmt->bindParam(':bustSize',  $this->bustSize);
            $stmt->bindParam(':waistSize',  $this->waistSize);
            $stmt->bindParam(':hipSize',  $this->hipSize);
            $stmt->bindParam(':shapeType',  $this->shapeType);
            $stmt->bindParam(':neckLenghtType',  $this->neckLenghtType);
            $stmt->bindParam(':height',  $this->height);
            $stmt->bindParam(':bottomSize',  $this->bottomSize);
            $stmt->bindParam(':segmentType',  $this->segmentType);
            $stmt->bindParam(':flawsSaddleBags',  $this->flawsSaddleBags);
            $stmt->bindParam(':flawsHips',  $this->flawsHips);
            $stmt->bindParam(':flawsBreastsTooSmall',  $this->flawsBreastsTooSmall);
            $stmt->bindParam(':flawsBreastsTooLarge',  $this->flawsBreastsTooLarge);
            $stmt->bindParam(':flawsLowerLegs',  $this->flawsLowerLegs);
            $stmt->bindParam(':flawsOverweight',  $this->flawsOverweight);
            $stmt->bindParam(':flawsDoubleChin',  $this->flawsDoubleChin);
            $stmt->bindParam(':flawsBigButtocks',  $this->flawsBigButtocks);
            $stmt->bindParam(':flawsStomachLoveHandles',  $this->flawsStomachLoveHandles);
            $stmt->bindParam(':flawsHollowBack',  $this->flawsHollowBack);
            $stmt->bindParam(':flawsArms',  $this->flawsArms);  
            $stmt->bindParam(':makeupDroopyEyes',  $this->makeupDroopyEyes);
            $stmt->bindParam(':makeupWideEyes',  $this->makeupWideEyes);
            $stmt->bindParam(':makeupSmallEyes',  $this->makeupSmallEyes);
            $stmt->bindParam(':makeupAccentuatedCheekbones',  $this->makeupAccentuatedCheekbones);
            $stmt->bindParam(':makeupDarkCircles',  $this->makeupDarkCircles);
            $stmt->bindParam(':makeupSmallLips',  $this->makeupSmallLips);
            $stmt->bindParam(':makeupLargeForehead',  $this->makeupLargeForehead);
            $stmt->bindParam(':makeupMoreYouthfullLook',  $this->makeupMoreYouthfullLook);
            $stmt->bindParam(':makeupWhenYouWearBlack',  $this->makeupWhenYouWearBlack);
            $stmt->bindParam(':fashionQuizCurrentQuestion',  $this->fashionQuizCurrentQuestion);
            $stmt->bindParam(':fashionQuizQ1',  $this->fashionQuizQ1);
            $stmt->bindParam(':fashionQuizQ2',  $this->fashionQuizQ2);
            $stmt->bindParam(':fashionQuizQ3',  $this->fashionQuizQ3);
            $stmt->bindParam(':fashionQuizQ4',  $this->fashionQuizQ4);
            $stmt->bindParam(':fashionQuizQ5',  $this->fashionQuizQ5);
            $stmt->bindParam(':fashionQuizQ6',  $this->fashionQuizQ6);
            $stmt->bindParam(':fashionQuizQ7',  $this->fashionQuizQ7);
            $stmt->bindParam(':fashionQuizQ8',  $this->fashionQuizQ8);
            $stmt->bindParam(':fashionQuizQ9',  $this->fashionQuizQ9);
            $stmt->bindParam(':fashionQuizQ10',  $this->fashionQuizQ10);
            $stmt->bindParam(':fashionQuizResults1',  $this->fashionQuizResults1);
            $stmt->bindParam(':fashionQuizResults2',  $this->fashionQuizResults2);
            $stmt->bindParam(':myFaceLength',  $this->myFaceLength);
            $stmt->bindParam(':myFaceSide',  $this->myFaceSide);
            $stmt->bindParam(':myFaceSuggestionType',  $this->myFaceSuggestionType);
            $stmt->bindParam(':fkeyUserId',  $this->fkeyUserId);
            $stmt->execute();
            $affected_rows = $stmt->rowCount();

        return  $affected_rows;
         // query to check if token exists and is valid
        
    }
    
   


}



?>