← Back
Editing: aggiungi_record.php
<? if ((!$id) || (!$formato) || (!$titolo)) { header( "Location: http://localhost/mostra_aggiungi_record.html"); exit; } $db_nome = "testDB"; $nome_tabella = "mia_musica"; $connessione = @mysql_connect("localhost", "omino", "tQ9472b") or die("Impossibile stabilire una connessione."); $db = @mysql_select_db($db_nome, $connessione) or die("Impossibile selezionare il database."); $sql = "INSERT INTO $nome_tabella (id, formato, titolo, artista_n, artista_c, etic_discogr, note, data_acq) VALUES (\"$id\", \"$formato\",\"$titolo\",\"$artista_n\",\"$artista_c\",\"$etic_discogr\",\"$note\",\"$data_acq\") "; $risultato = @mysql_query($sql,$connessione) or die("Impossibile eseguire l'interrogazione."); ?> <HTML> <HEAD> <TITLE>Aggiunta di un record</TITLE> </HEAD> <BODY> <H1>Aggiunta di un record a <? echo "$nome_tabella"; ?></H1> <TABLE CELLSPACING=3 CELLPADDING=3> <TR> <TD VALIGN=TOP> <P><STRONG>ID:</STRONG><BR> <? echo "$id"; ?></P> <P><STRONG>Data di acquisto (AAAA-MM-GG):</STRONG><BR> <? echo "$data_acq"; ?></P> </TD> <TD VALIGN=TOP> <P><STRONG>Formato:</STRONG><BR> <? echo "$formato"; ?> </P> </TD> </TR> <TR> <TD VALIGN=TOP> <P><STRONG>Titolo:</STRONG><BR> <? echo "$titolo"; ?></P> </TD> <TD VALIGN=TOP> <P><STRONG>Etichetta discografica:</STRONG><BR> <? echo "$etic_discogr"; ?></P> </TD> </TR> <TR> <TD VALIGN=TOP> <P><STRONG>Nome dell'artista:</STRONG><BR> <? echo "$artista_n"; ?></P> </TD> <TD VALIGN=TOP> <P><STRONG>Cognome dell'artista / Nome del gruppo:</STRONG><BR> <? echo "$artista_c"; ?></P> </TD> </TR> <TR> <TD VALIGN=TOP COLSPAN=2 ALIGN=CENTER> <P><STRONG>Le mie note:</STRONG><BR> <? echo stripslashes($note); ?></P> <P><a href="mostra_aggiungi_record.html">Aggiungi un altro record</a></P> </TD> </TR> </TABLE> </BODY> </HTML>
Save File
Cancel