<?php
$conn = mysql_connect('localhost','utente','pass') or die("Errore nella connessione a MySql: " . mysql_error());
mysql_select_db('nome_database',$conn) or die("Errore nella selezione del db: " . mysql_error());
$nome=$_POST['nome'];
$data=$_POST['data'];
$esordio=$_POST['esordio'];
$carica=$_POST['carica'];
$ruolo=$_POST['ruolo'];
$arma=$_POST['arma'];
$equipaggiamento=$_POST['equipaggiamento'];
$note=$_POST['note'];
$foto=$_POST['foto'];
$query=mysql_query("INSERT INTO soci (nome, data, esordio, carica, ruolo, arma, equipaggiamento, note, foto) VALUES ('$nome', '$data', '$esordio', '$carica', '$ruolo', '$arma', '$equipaggiamento', '$note', '$foto',)") or die ("Impossibile eseguire la query: ".mysql_error());
?>