//output recipe information while($dbRow=$dbQuery->fetch(PDO::FETCH_ASSOC) and ($cnt < $max)) { echo "".$dbRow["Name"].""."<br><img src=\".$dbRow['Picture']."' width='150' height='150' />"."".$dbRow["Instructions"]."<form method='POST'><input type='submit' name='submit' value='Completee' class='button'>"; $cnt++; $RecipeID=$dbRow["RecipeID"]; if (!$inserted) { $Displayed = false; $stmt=$conn->prepare("INSERT into UserMeals (UserID, MealID, Displayed) VALUES (:UserID, :MealID, :Displayed) "); $stmt->execute(array( ':UserID' => $UserID, ':MealID' => $MealID, ':Displayed' => $Displayed )); } } if (isset($_POST['submit']) && ($daysLeft == 7)){ $dbQuery = $conn->prepare('UPDATE UserRecipes SET Displayed="1" WHERE UserID=:UserID AND MealID=$MealID'); $dbParams = array(':UserID'=>$UserID); $dbQuery->execute($dbParams); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)