<?php
ini_set('display_errors', 1);
error_reporting(E_ALL|E_STRICT);
include_once("alphaID.php");
include_once("displayimage.php");
//include_once("insertdata.php");
//generate unique id
$key = microtime() + floor(rand()*10000);
$newname = alphaID($key);
// In PHP versions earlier than 4.1.0, $HTTP_POST_FILES should be used instead
// of $_FILES.
$ext = explode('.',$_FILES['userfile']['name']);
$extension = '.'.$ext[1];
$uploaddir = '/var/www/uploads/';
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
$filepath = '/var/www/html/testing/'.$newname.$extension;
move_uploaded_file($_FILES['userfile']['tmp_name'], $filepath));
header('Location: displayimage.php?img='.$newname.);
exit;
?>
I can't seem to get the header function at the bottom to work. I cannot see any output in the code and have tried many things in an attempt to get it to work.