So, I got the original code from
http://www.phpfreaks.com/tutorials/36/0.php
and this is my code
<?php
session_start();
header("Cache-control: private");
?>
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>User Options</title>
</head>
<body BGCOLOR="#636F7C" TEXT="#ffffff" LINK="#ffffff" VLINK="#ffffff">
<?php
include 'session.php';
writeTopMenue();
//the code above works fine, i'm 100% sure , it's the stuff below that's giving me trouble
?>
of it, i re-use this code many time in my current project
<form name="form1" method="post" action="" enctype="multipart/form-data">
<input type="file" name="imagefile">
<input type="submit" name="Submit" value="Submit">
<?
if(isset( $Submit ))
{
echo "button pressed";
if ($_FILES['imagefile']['type'] == "image/gif")
{
copy ($_FILES['imagefile']['tmp_name'], "files/".$_FILES['imagefile']['name'])
or die ("Could not copy");
echo "";
echo "Name: ".$_FILES['imagefile']['name']."";
echo "Size: ".$_FILES['imagefile']['size']."";
echo "Type: ".$_FILES['imagefile']['type']."";
echo "Copy Done....";
}
else
{
echo "";
echo "Could Not Copy, Wrong Filetype (".$_FILES['imagefile']['name'].")";
}
}
?>
</form>
</form>
</body>
</html>
But for some reason no image whatsoever gets uploaded and i get no debug information returned. I'm stuck.
Also, just for today the forum im coding is up at
http://24.101.133.244/yves/forumtest/viewforums.php
and the page where i want to do the image uploading is at:
http://24.101.133.244/yves/forumtest/useroptions.php
(note you need to be logged in, in order for to get access to this page).