use DBI; $dbh = DBI->connect('dbi:mysql:***:db371055412.db.1and1.com','***','***') or die("Cannot connect to database."); $sth = $dbh->prepare('insert into istanbul2011 (name, country, language, union, title, email, cellphone, landlinephone, facebook, skype, twitter, gender, age, needshelp) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?)'); $sth->execute($name, $country, $language, $union, $title, $email, $cellphone, $landlinephone, $facebook, $skype, $twitter, $gender, $age, $needshelp); $dbh->disconnect();