Hi Guys I am new to PHP and slowly learning. I have a piece of code that I need some help with. I am trying to take user input and use it to query data from a table in MYSQL. I know all my connections are working because I can change my query and make it dump the entire database, but now I want to search it I have tried so many things and just cannot seem to get any results from it. This is a small piece of the code but it is where the problem is. If I change '$_POST' to '100' for example I get the results back just how I want them but the user input seems to be where my problem is how can I fix this? Thank you for your help in advance!
<?php
include "sql_connect.php";
$test = mysql_query("SELECT * FROM Movies WHERE Mov_ID = '$_POST['text']'")
or die(mysql_error());
echo "<table border='1'>";
echo "<tr> <th>ID</th> <th>Title</th> <th>Actor 1</th> <th>Actor 2</th> <th>Actor 3</th> <th>Actor 4</th> <th>Notes</th> <th>Status</th> <th>Media</th></tr>";
while($row = mysql_fetch_array($test)){
echo "<tr><td>";
echo $row['Mov_ID'];
echo "</td><td>";
echo $row['Title'];
echo "</td><td>";
echo $row['Actor_1'];
echo "</td><td>";
echo $row['Actor_2'];
echo "</td><td>";
echo $row['Actor_3'];
echo "</td><td>";
echo $row['Actor_4'];
echo "</td><td>";
echo $row['Notes'];
echo "</td><td>";
echo $row['Status'];
echo "</td><td>";
echo $row['Media'];
echo "</td><td>";
-Justin