sorry ist klar das ihr mich nicht helfen könnt wenn ich keine fehlermeldung angebe
War gestern ein wenig verwirrt
also wenn ich auf den submit button klicke kommt bei mir
--------------------------------------------------------------------------------------------------------------------
Zugriff verweigert!
Der Zugriff auf das angeforderte Objekt ist nicht möglich. Entweder kann es
vom Server nicht gelesen werden oder es ist zugriffsgeschützt.
Sofern Sie dies für eine Fehlfunktion des Servers halten, informieren Sie
bitte den Webmaster hierüber.
Error 403
localhost
06/23/12 13:22:25
Apache/2.2.21
(Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8
--------------------------------------------------------------------------------------------------------------------
Also das Bild wird nicht gespeichert bzw. ich bekomme keine verbindung zustande
Hier nochmal der upload code...
<?php
?>
<html>
<head><title>Store binary data into SQL Database</title></head>
<body>
<?php
// code that will be executed if the form has been submitted:
if ($submit) {
// connect to the database
// (you may have to adjust the hostname,username or password)
MYSQL_CONNECT("localhost","root","");
mysql_select_db("binary_data");
$data = addslashes(fread(fopen($form_data, "r"), filesize($form_data)));
$result=MYSQL_QUERY("INSERT INTO binary_data (description,bin_data,filename,filesize,filetype) ".
"VALUES ('$form_description','$data','$form_data_name','$f orm_data_size','$form_data_type')");
$id= mysql_insert_id();
print "
This file has the following Database ID: $id";
echo mysql_error();
MYSQL_CLOSE();
} else {
// else show the form to submit new data:
?>
<form method="post" action="<?php echo $PHP_SELF; ?>" enctype="multipart/form-data">
File Description:
<input type="text" name="form_description" size="40">
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
File to upload/store in database:
<input type="file" name="form_data" size="40">
<input type="submit" name="submit" value="submit">
</form>
<?php
}
?>
</body>
</html>
Alles anzeigen