We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,099 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

unexpected T_STRING on line 15

I do not see it!

    <?php
    //Code for Header and Search Bar

    function headerAndSearchCode() {
    $defaultText = htmlentities($_GET['keywords']);
    echo '
    <header id="main_header">
    < div id= "rightAlign">

   ';

      //links will be here

        </div>
        <a href=\"index.php\"><imgsrc="http://www.lisa1986.com/images/mainLogo.png"></a>
              </header>
    <div id=\ "top_search\">
        <form name=\"input\" action=\"search.php\" method=\get\">
        <input type=\"text\" id=\"keywords\" size="\100px\" class=\"searchBox\"  

        value=\"$defaultText\">  
        <select id=\"category\" name\"category\" class=\"searchBox\">


";
//include categories here
echo '
    </select>

    <input type="submit" value"Search" class"button" />
    </form>
    </div>



';
}
?>
2
Contributors
1
Reply
38 Minutes
Discussion Span
1 Year Ago
Last Updated
2
Views
Ian159
Newbie Poster
1 post since Apr 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Between line 11-13 there is no echo and on line 15 you are not escaping double quotes as in the other tags. Change it to:

<img src=\"http://www.lisa1986.com/images/mainLogo.png\">
cereal
Veteran Poster
1,145 posts since Aug 2007
Reputation Points: 344
Solved Threads: 222
Skill Endorsements: 22

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0716 seconds using 2.81MB