please help Parse error: syntax error, unexpected '<' in

Discussion in 'PHP' started by sandeepdude, Dec 15, 2007.

  1. #1
    i get this error in all my pages.i have no idea what to do.please help me to solve it.it shows the error is in line 11.(<!DOCTYPE HTML PUBLIC .....)
    <?php
    // members page
    session_start();
    if ( empty( $username ) )
    {
        print "Please login below!";
        include 'login.html';
    } else
    {
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
    <html>
    <head>
    <title></title>
    <meta name="description" content="The ultimate tamil cinenews portal.grab all the latest hot gossips on tamil movies,actors,actress,interviews,film reviews,release dates and more.Also download unlimited number of latest tamil movie songs in mp3 format and top rated softwares for free" />
    <meta name="keywords" content="kollywood gossips,news,hot,tamil cinema world news ajith's,vikaram's,surya's,vijay's,rajini,kamal,nayanthara,trisha,jothika,namitha,bhavana,kushboo,jeeva,maddy,kodambakkam special" />
    </head>
    <frameset rows="131,*" cols="*" framespacing="0" frameborder="NO" border="0">
      <frame src="top.php" name="topFrame" frameborder="no" scrolling="NO" noresize marginwidth="0" marginheight="0" >
      <frameset rows="*" cols="138,*" framespacing="0" frameborder="NO" border="0"> 
      <frame src="left.php" name="leftFrame" frameborder="no" scrolling="NO" noresize marginwidth="0" marginheight="0">
      <frameset rows="23,*" cols="*" framespacing="0" frameborder="NO" border="0"> 
      <frame src="n_top.php" name="topFrame1" frameborder="no" scrolling="NO" noresize marginwidth="0" marginheight="0" >
      <frameset rows="*,15" cols="*" framespacing="0" frameborder="NO" border="0"> 
      <frame src="maincinenews.php" name="mainFrame" frameborder="no" marginwidth="0" marginheight="0">
      <frame src="n_bot.php" name="bottomFrame" frameborder="no" scrolling="NO" noresize marginwidth="0" marginheight="0">
    </frameset>
    </frameset>
    </frameset>
    </frameset>
    <noframes><body>
    </body></noframes>
    </html> }   ?>
    PHP:

     
    sandeepdude, Dec 15, 2007 IP
  2. Kuldeep1952

    Kuldeep1952 Active Member

    Messages:
    290
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #2
    You have to use either an echo or close the php with ?>

    e.g. by enclosing with ' and not including ' in content

    <?php
    // members page
    session_start();
    if ( empty( $username ) )
    {
        print "Please login below!";
        include 'login.html';
    } else
    {
    echo '
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
    <html>
    <head>
    <title></title>
    <meta name="description" content="The ultimate tamil cinenews portal.grab all the latest hot gossips on tamil movies,actors,actress,interviews,film reviews,release dates and more.Also download unlimited number of latest tamil movie songs in mp3 format and top rated softwares for free" />
    <meta name="keywords" content="kollywood gossips,news,hot,tamil cinema world news ajiths,vikarams,suryas,vijays,rajini,kamal,nayanthara,trisha,jothika,namitha,bhavana,kushboo,jeeva,maddy,kodambakkam special" />
    </head>
    <frameset rows="131,*" cols="*" framespacing="0" frameborder="NO" border="0">
      <frame src="top.php" name="topFrame" frameborder="no" scrolling="NO" noresize marginwidth="0" marginheight="0" >
      <frameset rows="*" cols="138,*" framespacing="0" frameborder="NO" border="0">
      <frame src="left.php" name="leftFrame" frameborder="no" scrolling="NO" noresize marginwidth="0" marginheight="0">
      <frameset rows="23,*" cols="*" framespacing="0" frameborder="NO" border="0">
      <frame src="n_top.php" name="topFrame1" frameborder="no" scrolling="NO" noresize marginwidth="0" marginheight="0" >
      <frameset rows="*,15" cols="*" framespacing="0" frameborder="NO" border="0">
      <frame src="maincinenews.php" name="mainFrame" frameborder="no" marginwidth="0" marginheight="0">
      <frame src="n_bot.php" name="bottomFrame" frameborder="no" scrolling="NO" noresize marginwidth="0" marginheight="0">
    </frameset>
    </frameset>
    </frameset>
    </frameset>
    <noframes><body>
    </body></noframes>
    </html>'; 
    }   
    ?>
    PHP:
     
    Kuldeep1952, Dec 15, 2007 IP
  3. mudassarahmad

    mudassarahmad Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    <?php
    // members page
    session_start();
    if ( empty( $username ) )
    {
    print "Please login below!";
    include 'login.html';
    } else
    {
    ?>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
    <html>
    <head>
    <title></title>
    <meta name="description" content="The ultimate tamil cinenews portal.grab all the latest hot gossips on tamil movies,actors,actress,interviews,film reviews,release dates and more.Also download unlimited number of latest tamil movie songs in mp3 format and top rated softwares for free" />
    <meta name="keywords" content="kollywood gossips,news,hot,tamil cinema world news ajiths,vikarams,suryas,vijays,rajini,kamal,nayanthara,trisha,jothika,namitha,bhavana,kushboo,jeeva,maddy,kodambakkam special" />
    </head>
    <frameset rows="131,*" cols="*" framespacing="0" frameborder="NO" border="0">
    <frame src="top.php" name="topFrame" frameborder="no" scrolling="NO" noresize marginwidth="0" marginheight="0" >
    <frameset rows="*" cols="138,*" framespacing="0" frameborder="NO" border="0">
    <frame src="left.php" name="leftFrame" frameborder="no" scrolling="NO" noresize marginwidth="0" marginheight="0">
    <frameset rows="23,*" cols="*" framespacing="0" frameborder="NO" border="0">
    <frame src="n_top.php" name="topFrame1" frameborder="no" scrolling="NO" noresize marginwidth="0" marginheight="0" >
    <frameset rows="*,15" cols="*" framespacing="0" frameborder="NO" border="0">
    <frame src="maincinenews.php" name="mainFrame" frameborder="no" marginwidth="0" marginheight="0">
    <frame src="n_bot.php" name="bottomFrame" frameborder="no" scrolling="NO" noresize marginwidth="0" marginheight="0">
    </frameset>
    </frameset>
    </frameset>
    </frameset>
    <noframes><body>
    </body></noframes>
    </html>
    <?
    }
    ?>
     
    mudassarahmad, Dec 15, 2007 IP
  4. sandeepdude

    sandeepdude Well-Known Member

    Messages:
    1,741
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    195
    #4
    hey thanks dudes
    its working.thanks a lot
     
    sandeepdude, Dec 16, 2007 IP
  5. Link-Man

    Link-Man Banned

    Messages:
    86
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Also keep in mind if you are going to run html in php delimiters make sure you escape it. Using your /
     
    Link-Man, Dec 16, 2007 IP