uploader.php
Code: Select all
<?php
// Where the file is going to be placed
$target_path = "uploads/";
/* Add the original filename to our target path.
Result is "uploads/filename.extension" */
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
$_FILES['uploadedfile']['tmp_name'];
$target_path = "uploads/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['uploadedfile']['name']).
" has been uploaded";
require_once('generate.php');
} else{
echo "There was an error uploading the file, please try again!";
}
?>
<br /><br />
<a href="photogallery.php">Click Here to View Your Photo</a>Code: Select all
<?php
$target_path = "uploads/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
$pfile = fopen("userpics.htm","a+");
// If everything is OK -> store user data
fwrite($pfile, "\n<embed src = \"$target_path\" /><p>");
fclose($pfile);
?>Code: Select all
<?php
include("userpics.htm");
?>I hope that you can understand this and that you can help me out cos it is really getting on my nerves now. I have tried everything i can think of
Thanks