hej jeg håber i kan hjælpe mig med det her
Jeg har lånt det her fra nettet
<?
// CREATE TABLE files (
// id int(11) DEFAULT '0' NOT NULL auto_increment,
// file_code blob NOT NULL,
// file_size int(50) DEFAULT '0' NOT NULL,
// file_type varchar(50) NOT NULL,
// PRIMARY KEY (id)
// );
if ($form_data && $form_data != "none") {
$file_code = addslashes(fread(fopen($form_data, "r"),
filesize($form_data)));
$connect = mysql_connect("localhost", "root");
mysql_select_db("yourdb" ,$connect);
if (mysql_query("insert into files (file_code, file_size, file_type)
values ('$file_code', '$form_data_size', '$form_data_type')")) {
echo "Your file is saved i the mysql-table 'files'";
} else {
echo "A problem occured, and the file hasn't been saved";
}
}
echo '<form action="Filer_i_mysql.php" method="post"
enctype="multipart/form-data">';
echo 'Select file: <input type="file" name="form_data">';
echo '<input type="hidden" name="MAX_FILE_SIZE" value="1000000"><br>';
//Defines max_file_size of files
echo '<input type="submit">';
echo '</form>';
?>
men jeg kan ikke få det at virke, værken på min PCer eller på mit webhotel
(hjemmeside)
den skriver bare
Internal Server Error
The server encountered an internal error or misconfiguration and was unable
to complete your request.
Please contact the server administrator, admin@localhost and inform them of
the time the error occurred, and anything you might have done that may have
caused the error.
More information about this error may be available in the server error log.
----------------------------------------------------------------------------
----
Apache/1.3.23 Server at localhost Port 80
begge steder
og så et lille spøgsmål til kan man flætte uploaden og gæstebogen sammen.
hilsen steen
|