Your query might be failing
$result = mysql_query($sql);
Try
$result = mysql_query($sql);
if (!$result)
{
echo mysql_error();
}
ShawnCplus
Code Monkey
1,583 posts since Apr 2005
Reputation Points: 526
Solved Threads: 268
What's the error? (also, your code doesn't have an ending brace for the outer if)
ShawnCplus
Code Monkey
1,583 posts since Apr 2005
Reputation Points: 526
Solved Threads: 268