- Dati inseriti Correttamente -
"; print "Grazie mille"; } else { write_form(); } function add_to_database( $cognome, $nome, $soprannome, $email, $telefono, $citta, $stato, $provincia, $note, $consensodati, $ip, $data, &$dberror ) { $user ="sansoste"; $pass ="shns.32f"; $db="sansoste"; $link = mysql_pconnect("localhost",$user, $pass); # definisce la data di inserimento $date_array = getdate(); $date_array[0]=$date_array[0]; $data="$date_array[0]"; if (! $link ) { $dberror = "Impossibile connettersi al Server Mysql "; return false; } if ( ! mysql_select_db( $db, $link ) ) { $dberror = mysql_error(); return false; } $query = "INSERT INTO sansostenesi ( cognome, nome, soprannome, email, telefono, citta, stato, provincia, note, consensodati, utente, data ) values('$cognome','$nome', '$soprannome', '$email', '$telefono', '$citta', '$stato', '$provincia', '$note', '$consensodati', '$ip', '$data' )"; if ( ! mysql_query( $query, $link ) ) { $dberror = mysql_error(); return false; } return true; } function write_form() { global $PHP_SELF; #print"