Here is what my code is now...basically what you gave me
I also want to assign the catID to a variable once it is pulled. How do you do that? Here is the error I am getting
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in line 8
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in line 9
<?php
if ($_POST[submit])
{
$connection = mysql_connect("xxx","xxx","xxx") or die("Couldn't make connection.");
$db = mysql_select_db("xxx", $connection) or die("Couldn't select database.");
$test = mysql_query("SELECT catID FROM tshirts WHERE tshirts.shirtname= '$_POST[DelShirtname]'",$db);
while($myRow = mysql_fetch_array($test))
{
echo "$myRow[catID]<br>";
}
}
else
{
?>
<form method="post" action="<?php echo $PHP_SELF?>">
<input type=text name=DelShirtname size=20>Delete:
<input type="Submit" name="submit" value="Go">
</form>
</body>
</html>
<?php
}
?>