$qQuery = mysql_query(" QUERY ") or die(); if ( $qQuery ){ echo 'inserted'; }{ echo 'not inserted'; }