Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- function Content($menu)
- {
- global $con;
- $sql = "SELECT name, content FROM menu WHERE name = '$menu'";
- $stmt = $con->prepare($sql); // PDOStatement
- $stmt->execute();
- $res = $stmt->fetch(PDO::FETCH_ASSOC);
- $GLOBALS['content_from_menu'] = nl2br($res['content']);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement