try outputting the SQL statment before your IF statement.
just to see if its a problem with your IF
IF the statement looks ok, copy and paste it into your MYSQL query tool and see if it runs ok.
if it does... i'm lost....🙂
$sql = "INSERT INTO indexpage
( id, title, content, datemod, img, imgdesc, datetodisplay )
VALUES
( '', '$t', '$c', now(), '$i', '$imgdesc', '$dm' )";
print sql;
if( $t && $c && $i && $imgdesc && $dm )
{
$sql = "INSERT INTO indexpage
( id, title, content, datemod, img, imgdesc, datetodisplay )
VALUES
( '', '$t', '$c', now(), '$i', '$imgdesc', '$dm' )";
//$result = mysql_query( $sql );
$result = mysql_query($sql) or die ("INSERT INTO DATABASE FAILED: ".mysql_error());
}