include('includes/db-connect.php'); $lang = 'en'; $recipe_id = $_GET['u']; $stmt = $conn->prepare("SELECT * FROM recipes WHERE id = ? "); $stmt->execute(array($recipe_id)); $recipe = $stmt->fetch(); $stmt = $conn->prepare("SELECT * FROM recipes_details WHERE recipe_id = ? "); $stmt->execute(array($recipe_id)); $sections = $stmt->fetchAll(); $date = date('j M, Y', strtotime($recipe['Add_Date'])); $share_title = ucwords($recipe['name']) . ' - Twixen'; $share_description = 'Twixen Recipes'; $share_photo = 'admin/uploads/recipes/'.$recipe['photo']; include('includes/header.php'); ?> Home Recipes Published foreach($sections as $section) { ?> if($section['photo'] != '') { ?> } ?> if($section['photo2'] != '') { ?> } ?> } ?> $stmt = $conn->prepare("SELECT * FROM recipes WHERE id != ? ORDER BY RAND() LIMIT 2 "); $stmt->execute(array($recipe_id)); $a_recipes = $stmt->fetchAll(); $counter = 0; foreach($a_recipes as $a_recipe) { $counter++; if($counter == 1) { ?> Prev Recipe } else { ?> Next Recipe } } ?> include('includes/footer.php'); ?>
Home Recipes
Published
Prev Recipe
Next Recipe