fixed the php  code
 so it won't send empty strings to the database