我有问题在我的mysql表中插入一个PHP $ _GET变量

This is a link that uses the $_GET method to pass category to a form

echo '<li><font class = "categories_list"><a href="postform.php?ct=' . $value[4] . '"</a>' . $value[0] . '</font></li>';

Once in the form I try to retrieve the $_GET variable and it echo's it correctly

if(isset($_GET['ct'])) 
{
echo $_GET['ct'];
$catname = $_GET['ct'];
}

Once I try to insert into my Mysql table it doesn't insert..

"INSERT INTO almt1(idnum, catname)
    VALUES ('$idnum', '$catname')";

When I do insert it goes in as an empty value

write your query like this

"INSERT INTO almt1(idnum, catname)
VALUES ($idnum, $catname)";

or,

"INSERT INTO almt1(idnum, catname)
VALUES ('".$idnum."', '".$catname."')";

Do not forget about security. If you are using MySQL, use mysql_real_escape_string() on GET parameters.

For example:

$catname = mysql_real_escape_string($_GET['catname']);