如何在javascript通知滑块中显示PHP输出

I downloaded a javascript popup notification file so I've been trying to integrate my codes to work with it. So i have this very PHP script that pops up a message each time user logs in or clicks the submit button. What i want to achieve is have the PHP output echoed out in the javascript pop up, so i tried this dump code that isn't working by replacing the message : '<p>This is the pop up message</p>', with message : '<?php if(isset($_GET['msg'])) echo $_GET['msg'];?>',:

This is my php code:

<?php
     $username = $_POST['l-form-5-username'];
     $password = $_POST['l-form-5-password'];

     // Harryson harry_admin
     if ($username =='danielorazulike@gmail.com' AND $password =='shatter'){
                            //Output Success Msg
                            $Msg = "'<p><i class=\"fa fa-check\"></i> <a href=\"#\">Download</a> has been sent to your email account. Please check your inbox/spam folder.</p>'";
                            header("Location:indextrial.php?Msg=$Msg");
                 }else{

                      //Output Not A Client Error Msg
                      $Msg = "'<p><i class=\"fa fa-lock\"></i> This File is Confidential. You're Not Our Client, therefore you have no access to this file thanks!</p>'";
                      header("Location:indextrial.php?Msg=$Msg");
                 }
?>

This is my javascript code:

<script>// create the notification
var notification = new NotificationFx({
    var msg = ;

    // element to which the notification will be appended
    // defaults to the document.body
    wrapper : document.body,

    **// THIS IS WHERE I TRIED TO ECHO OUT THE PHP MESSAGE**
    *message : '<?php if(isset($_GET['msg'])) echo $_GET['msg'];?>',*

    // layout type: growl|attached|bar|other
    layout : 'growl',

    // effects for the specified layout:
    // for growl layout: scale|slide|genie|jelly
    // for attached layout: flip|bouncyflip
    // for other layout: boxspinner|cornerexpand|loadingcircle|thumbslider
    // ...
    effect : 'scale',

    // notice, warning, error, success
    // will add class ns-type-warning, ns-type-error or ns-type-success
    type : 'error',

    // if the user doesn´t close the notification then we remove it 
    // after the following time
    ttl : 6000,

    // callbacks
    onClose : function() { return false; },
    onOpen : function() { return false; }

});

// show the notification
notification.show();</script>

I came across this function; json_encode() that translated the PHP string to a correct JavaScript string and i was sure not to include the quotes in JavaScript. Just this alone did the magic and after all my code wasn't dump!

    // This was how my message now looked!
    message : <?php if(isset($_GET['msg'])) echo json_encode($_GET['msg']);?>,