Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Aug 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP Parse error: syntax error, unexpected end of file

    Hi guys,
    First of this is my first time on these forums but I am having a problem with some code it have.

    The page is loading blank and this is the error:
    PHP Parse error: syntax error, unexpected end of file in /home/---/public_html/admin/content/editnews.php on line 53
    I cant seem to find the problem.

    If anyone can help that would be great!

    Thanks,
    Ian

    <?php
    if($check_login == true && $check_admin == true && $check_group == 1)
    {
    $p = $_GET[id];
    $p = mysql_real_escape_string($p);
    $n = mysql_query("SELECT * FROM news WHERE id='$p'");
    $c = mysql_num_rows($n);
    if($n < 1)
    {
    ?>

    <?php
    }
    else
    {
    $f = mysql_fetch_assoc($n);
    $msg = $f[body];
    $sub = $f[sub];
    ?>
    <section style="margin-top: -40px;" class="slider">
    <img src="http://vdalairlines.com/new/images/editrelease.png" /></section>

    <?php if($_GET[m] == 1) { ?>
    <div class="noti error omega half-bottom">
    <p><span class="icon-info-sign fl"></span> You must fill out both the subject and the message.</p>
    </div><div class="clearfix"></div>
    <?php } ?>
    <?php if($_GET[m] == 2) { ?>
    <div class="noti error omega half-bottom">
    <p><span class="icon-info-sign fl"></span> Your news release has been added!</p>
    </div><div class="clearfix"></div>
    <?php } ?>
    <h4>Edit News</h4>

    <div class="nine columns alpha">
    <form style="padding-top: 20px;" action="./base/editnews.php" method='post' name='add'>
    <input type="text" onclick="this.value=''" value="<?php echo $sub; ?>" name="sub" style="width:600px;" /><br />
    <textarea style="height: 400px;width: 98%;" name="msg"><?php echo $msg; ?></textarea><br /><br />
    <script>
    CKEDITOR.replace( 'msg' );
    </script><input type='hidden' name='id' value='<?Php echo $_GET[id]; ?>' />
    <center>
    <a onclick="document.add.submit();" class="btn btn-success">Edit Press Release</a> or <a href="http://vdalairlines.com/new/?content=pilotcenter" class="btn btn-danger">Cancel</a><br>
    </center><br>
    <br>
    <br>
    <?php } ?>
    </form>
    </div>

  • #2
    New to the CF scene
    Join Date
    Aug 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Never mind issue has been resolved

  • #3
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,312
    Thanks
    23
    Thanked 612 Times in 611 Posts
    if($check_login == true && $check_admin == true && $check_group == 1){
    has no end closing bracket.
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •