Finally implemented mysqli_real_escape_string in insert and update - should fix some problems when using single quotation marks in inserts and updates