display user input value
<pre><code>+-----+-------+--------+
  ID  | Owner | Number |
+-----+-------+--------+
 com1 | peter | 103045 |
+-----+-------+--------+
 com2 | deter | 103864 |
+-----+-------+--------+
</code></pre>

<p>Hey guys. I am working on this part of the project where the user is suppose to input a certain ID. When he input this certain ID it is suppose to print out everything in the row w that ID. In this case if he inputs com1, it will display:</p>

<pre><code>+-----+-------+--------+
  ID  | Owner | Number |
+-----+-------+--------+
 com1 | peter | 103045 |
+-----+-------+--------+
</code></pre>

<p>I used this form and code:</p>

<p>form.php</p>

<pre><code>    &lt;form action="query.php" method="POST"&gt;
    Enter your ID: &lt;input type="varchar" name="id" /&gt;&lt;br /&gt;
    &lt;input type="submit" value="Audit" /&gt;
    &lt;/form&gt; 
</code></pre>

<p>query.php</p>

<pre><code>   $con = mysql_connect("localhost", "root", "");
    if (!$con)
        {
        die('Could not connect: ' . mysql_error());
        }

    mysql_select_db("livemigrationauditingdb", $con);


    $input = (int) $_POST['id'];
    $query = mysql_query("SELECT * FROM system_audit WHERE ID = $input");

    echo "&lt;table border='1'&gt;
    &lt;tr&gt;
    &lt;th&gt;ID&lt;/th&gt;
    &lt;th&gt;Owner&lt;/th&gt;
    &lt;th&gt;Number&lt;/th&gt;
    &lt;/tr&gt;";


    while($row = mysql_fetch_array($query))
    {
      echo "&lt;tr&gt;";
      echo "&lt;td&gt;" . $row['ID'] . "&lt;/td&gt;";
      echo "&lt;td&gt;" . $row['Owner'] . "&lt;/td&gt;";
      echo "&lt;td&gt;" . $row['Number'] . "&lt;/td&gt;";
      echo "&lt;/tr&gt;";
      }
    echo "&lt;/table&gt;";

    mysql_close($con); 
</code></pre>

<p>think you guys know the mistake? oh and is there away for me not to link it to other page? i need the form and codes to be in one page. currently my form links to query.php. is there a way to cancel this line and it still works. thanks!</p>
