SQL search using php
Hi i need help with this code. it gives me error due to the action of the form or the name of the form
i want a web based system which will allow the end user to enter the unit code and the system will display the timtable of that unit


    <HTML>
    <body bgcolor="#006699">
    <div class="header"><a href="#"><img src=fnu.jpg LOGO.jpg width="1567" height="230"> </a>
    </div>
    <div id="menu" style="background-color:#FFD700;height:500px;width:100px;float:left;">
      <p><strong>Home</strong></p>
      <p><strong><a href="Help.html">Help</a></strong>
      <p><strong><a href="contact us.html">Contact Us</a></strong>
     
    </div>
    <form name= search action="search" method="post">
    <P>
    Unit Code: <INPUT type="text" name="Unit Code"><br>
    
    </P>
    <P>
    <INPUT type="submit" value="Search">
    </P>
    </FORM>
    <script language=php>
    $dbServer=mysql_connect("localhost","root","");
    if (!$dbServer) {echo "Failed to connect to MySQL"; exit; }
     
    mysql_select_db("Timetable",$dbServer);
    
    $sql ="SELECT * FROM Trimester Timetable";
    $sql.=" WHERE Unit Code=\"".$_POST["Unit Code"]."\";
    $queryResult=mysql_query($sql);
     
    if (mysql_error())
    {
    echo "Problem with Query<BR>";
    echo "The following error message was returned from MySQL:<BR>";
    echo mysql_error();
    exit;
    }
     
    if (mysql_num_rows($queryResult)==0)
    {
    echo "No phones were found please try again.";
    }
    else
    {
    while ($dbRecord=mysql_fetch_array($queryResult))
    {
    echo <".$dbRecord["Unit Code"].", ".$dbRecord["Unit Name"].", ".$dbRecord["Day ID"].", ".$dbRecord["Room"].", ".$dbRecord["Class Type ID"].", ".$dbRecord["Name"].", ".$dbRecord["Email"]."<BR>";
    }
    }
    </script>
    
    <div id="footer" style="background-color:#FFA500;clear:both;text-align:center;"> Copyright of | Designed by   </div>
    </body>
    </html
SQL search using php
===

Hi i need help with this code. it gives me error due to the action of the form or the name of the form
i want a web based system which will allow the end user to enter the unit code and the system will display the timtable of that unit


    <HTML>
    <body bgcolor="#006699">
    <div class="header"><a href="#"><img src=fnu.jpg LOGO.jpg width="1567" height="230"> </a>
    </div>
    <div id="menu" style="background-color:#FFD700;height:500px;width:100px;float:left;">
      <p><strong>Home</strong></p>
      <p><strong><a href="Help.html">Help</a></strong>
      <p><strong><a href="contact us.html">Contact Us</a></strong>
     
    </div>
    <form name= search action="search" method="post">
    <P>
    Unit Code: <INPUT type="text" name="Unit Code"><br>
    
    </P>
    <P>
    <INPUT type="submit" value="Search">
    </P>
    </FORM>
    <script language=php>
    $dbServer=mysql_connect("localhost","root","");
    if (!$dbServer) {echo "Failed to connect to MySQL"; exit; }
     
    mysql_select_db("Timetable",$dbServer);
    
    $sql ="SELECT * FROM Trimester Timetable";
    $sql.=" WHERE Unit Code=\"".$_POST["Unit Code"]."\";
    $queryResult=mysql_query($sql);
     
    if (mysql_error())
    {
    echo "Problem with Query<BR>";
    echo "The following error message was returned from MySQL:<BR>";
    echo mysql_error();
    exit;
    }
     
    if (mysql_num_rows($queryResult)==0)
    {
    echo "No phones were found please try again.";
    }
    else
    {
    while ($dbRecord=mysql_fetch_array($queryResult))
    {
    echo <".$dbRecord["Unit Code"].", ".$dbRecord["Unit Name"].", ".$dbRecord["Day ID"].", ".$dbRecord["Room"].", ".$dbRecord["Class Type ID"].", ".$dbRecord["Name"].", ".$dbRecord["Email"]."<BR>";
    }
    }
    </script>
    
    <div id="footer" style="background-color:#FFA500;clear:both;text-align:center;"> Copyright of | Designed by   </div>
    </body>
    </html