<?php

session_start();
if (isset($_POST['submit'])) {
    include "dbconnection.php";
    $game_id = mysql_real_escape_string($_REQUEST['funlearn_id']);
    $game_comment_id = mysql_real_escape_string($_REQUEST['fun_learn_comment_id']);
    $games = getFunLearnById($game_id);
    $game = mysql_fetch_array($games);
    $game_seo = $game['fun_learn_seo'];
    if (isset($_SESSION['user_id'])) {
        $comments = mysql_real_escape_string($_REQUEST['comments']);
        updateFunlearnComments($game_comment_id, $game_id, $comments, $_SESSION['user_id']);
        header("location:kid-fun-learn-{$game_seo}&comment#funlearn");
    } else {
        if (isset($_SESSION['FBID'])) {
            $comments = mysql_real_escape_string($_POST['comments']);
            $user_facebook_id = getUserByFaceBookId($_SESSION['FBID']);
            if ($user_facebook_id) {
                $face_book_user = mysql_fetch_array($user_facebook_id);
                $user_id = $face_book_user['user_id'];
            }
            updateFunlearnComments($game_comment_id, $game_id, $comments, $user_id);
            header("location:kid-fun-learn-{$game_seo}&comment#funlearn");
        } else {
            header("location:kid-fun-learn-{$game_seo}&comment#funlearn");
        }
    }
} else {
    header("location:kid-fun-learn-{$game_seo}&comment#funlearn");
}
<?php

session_start();
include "dbconnection.php";
$funlearn_comment_id = $_REQUEST['id'];
$funlearn_id = $_REQUEST['fun_learn_id'];
$rhymes = getFunLearnById($funlearn_id);
$rhyme_detail = mysql_fetch_array($rhymes);
$rhyme_seo = $rhyme_detail['fun_learn_seo'];
deleteFunLearnComment($funlearn_comment_id);
header("location:kid-fun-learn-{$rhyme_seo}");
<?php

session_start();
if (isset($_GET['id'])) {
    include "dbconnection.php";
    $game_id = $_GET['id'];
    $detail_games = getFunLearnById($_GET['id']);
    $detail_game = mysql_fetch_array($detail_games);
} else {
    header("location:kid-games");
}
?>
<!doctype html>
<html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="<?php 
echo $detail_game['meta_tag_keyword'];
?>
" name="keywords"  />
<meta content="<?php 
echo $detail_game['meta_tag_description'];
?>
" name="description"/>
<meta property="og:image" content="http://www.thefunkids.com/fun_learns/fun_learn_images/<?php 
echo $detail_game['fun_learn_image'];
?>
" />
<title><?php 
echo $detail_game['fun_learn_title'];
?>
<?php

session_start();
if (isset($_POST['submit'])) {
    include "dbconnection.php";
    $fun_learn_id = mysql_real_escape_string($_POST['fun_learn_id']);
    $games = getFunLearnById($fun_learn_id);
    $game = mysql_fetch_array($games);
    $game_seo = $game['fun_learn_seo'];
    if (isset($_SESSION['user_id'])) {
        $comments = mysql_real_escape_string($_POST['comments']);
        addFunlearncomment($fun_learn_id, $comments, $_SESSION['user_id']);
        $base_url = "http://thefunkids.com/admin";
        $subject = "Comments on Game for Moderation";
        $from = "*****@*****.**";
        $to = "*****@*****.**";
        $mail_body = "Dear All,<br/><br/> A comment has been posted on our website TheFunKids.com and is pending approval. Kindly review and <br /><br /> moderate whether the comment should be posted or not.<br /><br /><br/>Login Url:<a href=" . $base_url . ">" . $base_url . "</a><br/><br/><strong>User Name:</strong>admin@thefunkids.com<br><strong>Password:</strong>admin123<br/></br>Regards & Love<br/><br/>The Fun Kids Team";
        $body = wordwrap($mail_body, 2000);
        //$body_user = wordwrap($mail_body_user,70);
        $headers = "MIME-Version: 1.0" . "\r\n";
        $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
        $headers .= "From: " . $from . "\r\n";
        $headers .= 'Bcc:raheelaslam@golive.com.pk,amohsin@golive.com.pk,saher@golive.com.pk' . "\r\n";
        //------------------------Thanks You Email-------------------------------------------------------------------
        mail($to, $subject, $mail_body, $headers);
        header("location:kid-fun-learn-{$game_seo}&comment#funlearn");
    } else {
        if (isset($_SESSION['FBID'])) {
            $comments = mysql_real_escape_string($_POST['comments']);
            $user_facebook_id = getUserByFaceBookId($_SESSION['FBID']);
            if ($user_facebook_id) {