Upload form skal osse indsætte i db
Hej... eksperter, jeg har brug for at den her, osse indsætter filnavnet i db'en, ved bare ikke hvordan jeg skal gøre det, det er jo nemt nok med mailen, der kan du bare kører $_POST[files] men det kan du jo ikke her...Hvad kan jeg gøre...?
----------------KILDEKODE START--------
<head>
<title>Submit Site</title>
</head>
<background="hgx/gradient.gif">
<body background="gfx/gradient.gif">
<?
include ("db.php");
mysql_query("INSERT INTO tabel (navn, mail, url, description, gategory)
VALUES ('$navn','$mail','$url','$description','$gategory')");
?>
<?php
if($_POST['up']){
$files = $_FILES['upfil']['name'];
$file = $_FILES['upfil']['tmp_name'];
$sti = "/usr/local/psa/home/vhosts/gex.dk/httpdocs/script/upload2/thumb/";
$temparr = explode(".", $files);
$temparr[count($temparr)-2] = time();
$files = implode(".", $temparr);
move_uploaded_file($file, $sti . $files);
mail("webmaster@gex.dk", "Et billede er uploadet", "Submit modtaget:\nNavn: $_POST[navn]\nE-Mail:$_POST[mail]\nURL::$_POST[url]\nDescription:$_POST[description]\nGategory:$_POST[gategory]\nBillede navn: $files", "From: $_POST[navn] <$_POST[mail]>");
echo "<center><font color='red'>Din fil er nu uploadet</font></center><br /><br />";
}
?>
<form action="index.php" method="post" enctype="multipart/form-data">
<br>
<br>
<br>
<div align="center">
<center>
<table border="1" width="70%" bordercolor="#000000" cellspacing cellpadding bgcolor="#FFFFCC">
<tr>
<td width="100%">
<p align="center"><img border="0" src="gfx/logo.jpg" width="300" height="50"></p>
</center>
<div align="center">
<table width="90%" cellspacing cellpadding>
<tr>
<td width="100%"><center>
<table border="0" width="103%" cellspacing="3" cellpadding="3">
<tr>
<td width="32%"><b>You Name:</b></td>
<td width="5%"></td>
<td width="67%"><input type="text" name="navn"></td>
</tr>
<tr>
<td width="32%">
<b>You E-Mail:</b></td>
<td width="5%"></td>
<td width="67%"><input type="text" name="mail" size="20"></td>
</tr>
<tr>
<td width="32%"><b>Gallery URL:</b></td>
<td width="5%"></td>
<td width="67%"><input type="text" name="url" size="20"></td>
</tr>
<tr>
<td width="32%"><b>Description</b></td>
<td width="5%"></td>
<td width="67%"><input type="text" name="description" size="20"></td>
</tr>
<tr>
<td width="32%"><b>Gategory</b></td>
<td width="5%"></td>
<td width="67%"><select size="1" name="gategory">
<option>Amateurs</option>
<option>Babes</option>
<option>Big Tits</option>
<option>Blowjobs</option>
<option>Cheerleaders</option>
<option>Chubby</option>
<option>Cumshots</option>
<option>Fetish</option>
<option>Groupsex</option>
<option>Hardcore</option>
<option>Interracial</option>
<option>Lesbians</option>
<option>Movies</option>
<option>Teen</option>
<option>Toys</option>
</select></td>
</tr>
<tr>
<td width="32%"><b>Upload Thumb<br>
(Jpg, 88x88 pixels):</b></td>
<td width="5%"></td>
<td width="67%"><input type="file" name="upfil"></td>
</tr>
<tr>
<td width="32%"></td>
<td width="5%"></td>
<td width="67%">
<input type="submit" value="Submit" name="up">
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
</form>
-------------------------KILDEKODE STOP---------
