Thanks for your reply mwasif!!
Ok, I've removed the quotes and at first it still didn't work.
When I tried reducing the fields, I realised the ip address field was stopping the code working. When I just use fname, lname, email ... it works. With ip field, it doesn't.
Not sure why this is, even when I use:
$ip = $_SERVER['REMOTE_ADDR'];
I even changed the field type to INT (unsigned) in the database from VARCHAR (150) but this also doesn't make a difference.
Probably not that important but it would be good to know how to pass ip address to database.
Thanks again!