-Vipr-
Legacy Member
ik heb alle machtegingen op mijn map gegeven, volgens mij is alles juist maar toch wil hij niet uploaden :/ kan iemand mij misschien helpen?
grtz!
grtz!
PHP:
<? include('connect.php');
session_start();
if ($_SESSION['haartooi'])
{
$get = mysql_fetch_object(mysql_query("Select * from h_register where id='$id' ")); $level = $get->level;
if ($level == 1)
{
if (isset($admin_submit))
{
if(($titel != "") and ($bericht!= ""))
{
mysql_query("insert into h_nieuws (titel,bericht) VALUES ('$titel','$bericht')");
}
elseif($userfile == ""){ $fout = "1"; }
if (is_uploaded_file($_FILES['userfile']['tmp_name']))
{
$size = $_FILES['userfile']['size'];
if ($size < 100000)
{
$filename = $_FILES['userfile']['name'];
$extensie = substr($filename, -3);
if ( ($extensie == "jpg") || ($extensie == "JPG") )
{
$filename = "$id.jpg";
move_uploaded_file($_FILES['userfile']['tmp_name'],'pictures/'.$filename);
}
else
{
$fout_jpg = "<font color='red'>jpg plz ...</font>";
}
}
else
{
$fout_tegroot = "<font color='red'>Max size is 100kb</font>";
$_SERVER['PHP_SELF'];
}
}
}
?>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td width="641" height="19" align="left">
<div class="contentblock" id="contentblock" style="width:635"><span class="pathway"></span><br>
<!-- BEGIN --> <!-- NEWS -->
<FORM enctype="multipart/form-data" action="<? $_SERVER['PHP_SELF'];?>" method="post">
<b>Admin - News</b>
<table rules="none" border="0" >
<tr>
<td>Titel</td>
<td><INPUT type="text" name="titel" size="60" class="inputbox"></td>
</tr>
<tr>
<td class=>Bericht</td>
<td><TEXTAREA type="text" name="bericht" rows="5" cols="60" class="inputbox"></TEXTAREA></td>
</tr>
<tr>
<td colspan="2" align="right"></td>
</tr>
<tr>
<td> </td>
<td><? if (isset($fout)) { echo "<font color=#ff6600>Gelieve uw velden in te vullen</font>"; }?></td>
</tr>
</TABLE>
<!-- END --> <!-- NEWS -->
<!-- BEGIN --> <!-- PICTURES -->
<b>Admin - Foto's Uploaden.</b>
<table rules="none" border="0">
<tr>
<td>
Foto
</td>
<td>
<INPUT type="file" name="userfile">
</td>
</tr>
<tr>
<td align="right" colspan="2">
<INPUT type="submit" name="admin_submit" value="submit" class="button">
</td>
</tr>
<tr>
<td>
<? echo "$fout_tegroot $fout_jpg"; ?>
</td>
</tr>
</table>
</form>
<!-- END --> <!-- PICTURES -->
</div>
</td>
</tr>
</table>
<?}
}
else
{
echo"<meta http-equiv=Refresh content=5;URL=http://www.kta-informaticabeheer.be/haartooi>";
echo"<font color=red>You don't have access to this Page !!!!!<br>Redirect in 5 sec...</font>";
}
?>
</body>
</html>