Upload, renamer til det man har skrevet
Hej eksperter ville gerne have at denne upload form ikke renamer tilfældigt, men der imod til det man har skrevet i filnavn<--------SCRIPT START-------->
<background="hgx/gradient.gif">
<link="#C0C0C0" vlink="#C0C0C0" alink="#C0C0C0">
<?php
if($_POST['up']){
$files = $_FILES['upfil']['name'];
$file = $_FILES['upfil']['tmp_name'];
$sti = "---min sti---";
$temparr = explode(".", $files);
$temparr[count($temparr)-2] = time();
$files = implode(".", $temparr);
move_uploaded_file($file, $sti . $files);
mail("kim@gex.dk", "Pic uploadet..", "Submit:\nName: $_POST[navn]\nE-Mail:$_POST[mail]\nURL::$_POST[url]\nDescription:$_POST[description]\nGategory:$_POST[gategory]\nPic name: http://www.gex.dk/script/upload2/thumb/$files", "From: $_POST[navn] <$_POST[mail]>");
echo "<center><font color='red'><h3>Your fil is uploaded</h3></font></center><br><br>";
include ("../dbconnect.php");
mysql_query("INSERT INTO anmeldelse(filnavn, ditnavn)
VALUES ('$files')");
}
?>
<form action="upload.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"><br>
<font color="#C0C0C0" size="1" face="Verdana"><b><a href="rules.php" target="_blank">See
Our Rules</a></b></font></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>
<--------SCRIPT SLUT--------->
