I went through the code with a fine toothed comb and found this: [code]$insertSQL = sprintf("INSERT INTO customers (CustomerNumber, Title, Address, Surname, WorkNumber, HomeNumber, MobileNumber, Notes) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($custID, "text"), GetSQLValueString($_POST['title'], "text"), GetSQLValueString($_POST['address'], "text"), GetSQLValueString($_POST['surname'], "text"), GetSQLValueString($_POST['worknumber'], "int"), GetSQLValueString($_POST['homenumber'], "int"), GetSQLValueString($_POST['mobilenumber'], "int"), GetSQLValueString($_POST['notes'], "text")); [/code] I feel like an idiot. I changed the int's to text's and now it works fine. Thanks anyway :)