Billede upload til mysql
hej jeg har følgende script:<?php
// store.php3 - by Florian Dittmer <dittmer@gmx.net>
// Example php script to demonstrate the storing of binary files into
// an sql database. More information can be found at http://www.phpbuilder.com/
?>
<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)
require("db.php");
?>
<?php
$tid = date("d/m Y - H:i");
$data = addslashes(fread(fopen($form_data, "r"), filesize($form_data)));
$result=MYSQL_QUERY("INSERT INTO drukmails (description,bin_data,filename,filesize,filetypenavn,tag,email,ip,dato,ang,hjemm) ".
"VALUES ('$form_description','$data','$form_data_name','$form_data_size','$form_data_type','$navn','$tag','$email','$_SERVER[REMOTE_ADDR]','$tid','$ang','$site')");
$id= mysql_insert_id();
print "<p>This file has the following Database ID: <b>$id</b>";
MYSQL_CLOSE();
} else {
// else show the form to submit new data:
?>
<form method="post" action="<?php echo $PHP_SELF; ?>" enctype="multipart/form-data">
<div align="center">Fil Beskrivelse:<br>
<input type="text" name="form_description" size="40">
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000000">
<br>
Billede:<br>
<input type="file" name="form_data" size="40">
</div>
<table border="0" cellspacing="0" cellpadding="0" width="371" height="126" class="tekst_normal">
<tr>
<td width=95> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td width="95" height="27"><b>Navn : </b></td>
<td height="27" colspan="2"> <b>
<input type="text" size="16" class="box" name="navn">
</b></td>
</tr>
<tr>
<td width="95"><b>Email : </b></td>
<td colspan="2">
<input type="text" size="16" class="box" name="email">
</td>
</tr>
<tr>
<td width="95"><b>Hjemmeside :</b></td>
<td width="124">
<input type="text" size="20" class="box" name="site" value="http://">
</td>
<td width="152"><b><i class="tekst_normal">Husk http://</i></b></td>
</tr>
<tr>
<td width="95"><b>Ang. : </b></td>
<td colspan="2"> <b>
<input type="text" size="20" class="box" name="ang">
</b></td>
</tr>
<tr>
<td width="95"><b>Tekst :</b></td>
<td colspan="2">
<textarea cols="36" class="box" name="tag" rows="5"></textarea>
</td>
</tr>
</table>
<input type="submit" value="Indsend" class="submit" name="submit">
<? mysql_close(); ?>
</form>
<div align="center">
</div>
</BODY>
</HTML>
den virker bare ikke som den skal :/.. den giver mig fejl på linje 90 (allersidste linje [</html>])
