I've made a very stupid mistake, but I don't know what it is...

Discussion in 'PHP' started by Steve Thomas, Nov 17, 2013.

  1. #1
    I was trying to add some code from an external site and when I realised I didn't want it, I deleted it, but I must have accidentally deleted some part of the code as well, as I now get this error message:

    Parse error: syntax error, unexpected '<' in /home1/skaptart/public_html/about.php on line 6

    Here is the code:

    <?php
    $idd="";
    include_once("config/config.php");
    include_once("header.php");

    <div id="content">
    <div class="content">
    <?php
    if(isset($_GET['uid']))
    {
    $sqll=mysql_query("select * from manage_pages where id='".$_GET['uid']."'");
    $resll=mysql_fetch_assoc($sqll);?>
    <h3>
    <?php echo $resll['title']; ?>
    </h3>
    <div class="contentxtbg" >
    <?php echo $resll['description']; ?>
    </div>
    <?php
    }
    else if(isset($_GET['id']))
    {
    $idd=$_GET['id'];
    $sql=mysql_query("select * from about_us where id='".$idd."'");
    $res1=mysql_fetch_assoc($sql);?>
    <h3>
    <?php echo $res1['title']; ?>
    </h3>
    <div class="contentxtbg" >
    <?php echo $res1['descr']; ?>
    </div><?php } ?>
    </div>
    </div>
    <?php include_once("footer.php"); ?>
     
    Steve Thomas, Nov 17, 2013 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    You need to close off the first <?php bit.
    <?php
    $idd="";
    include_once("config/config.php");
    include_once("header.php");


    ?> <- this one here
     
    PoPSiCLe, Nov 17, 2013 IP
  3. GORF

    GORF Well-Known Member

    Messages:
    224
    Likes Received:
    21
    Best Answers:
    3
    Trophy Points:
    165
    #3
    Missing a close tag:

    <?php
    $idd="";
    include_once("config/config.php");
    include_once("header.php");
    ?>
    <div id="content">
     
    GORF, Nov 17, 2013 IP
  4. Steve Thomas

    Steve Thomas Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #4

    Hey guys,

    Thank you SO much for helping me. Your quick response is MASSIVELY appreciated!

    Best,

    Steve
     
    Steve Thomas, Nov 17, 2013 IP
  5. ryan_uk

    ryan_uk Illustrious Member

    Messages:
    3,983
    Likes Received:
    1,022
    Best Answers:
    33
    Trophy Points:
    465
    #5
    Try out NetBeans bundled with PHP. It has syntax highlighting and error checking:
    https://netbeans.org/downloads/index.html

    It will help you quickly identify such errors in the future.
     
    ryan_uk, Nov 17, 2013 IP
  6. Steve Thomas

    Steve Thomas Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #6
    TY!
     
    Steve Thomas, Nov 17, 2013 IP