codice:
<?php
$inserimento=mysql_query("INSERT INTO guestbook (nome,cognome,nato,professione,eta,dj_preferito,rave_fatti,sito_preferito,come_siveste,messaggio,img1)
VALUES ('{$HTTP_POST_VARS[nome]}', '{$HTTP_POST_VARS[cognome]}', '{$HTTP_POST_VARS[nato]}', '{$HTTP_POST_VARS[professione]}', '{$HTTP_POST_VARS[eta]}', '{$HTTP_POST_VARS[dj_preferito]}', '{$HTTP_POST_VARS[rave_fatti]}', '{$HTTP_POST_VARS[sito_preferito]}', '{$HTTP_POST_VARS[come_siveste]}', '{$HTTP_POST_VARS[messaggio]}', '{$HTTP_POST_FILES[img1][name]}')") or die(mysql_error());
echo "messaggio inviato con successo"
?>
<?php
if ($img1_name != "img1") {
@copy("$img1" , percorso $img1_name") or die("Couldn't Upload Your File.");
} else {
die("No File Specified");
}
?>
<HTML>
<HEAD>
<TITLE>File Upload Successful</TITLE>
</HEAD>
<BODY>
<H1>File Upload Successful!</H1>
Successfully Sent: <?php echo "$img1_name"; ?> , a <?php echo "$img1_size"; ?> byte file with the extension type of <?php echo "$img1_type"; ?> </P>