No you can't use serialize() because serialize() method creates a URL encoded text string by serializing form values.....but we are sending a file also that's why we use FormData there..... And yes you can use prepared statement for inserting data into database.
I'm watching your secure login sign up part where you have sent data with ajax action okay fine but I'm facing undefined index file variable ? I want to upload image with sign up process ?
Sir I've watched your total complete login tutorial but sir you have used isset there..when I'm trying to upload image file through the registrationa form I'm getting error of undefined index