Jump to content

Lost in PHP in need of help

- - - - -

  • Please log in to reply
No replies to this topic

#1
rebelcreek

rebelcreek

    Newbie

  • Members
  • Pip
  • 1 posts
Hello,
I'm really new to php and I am in need of help. I'm trying to have a image uploaded to a dir and resize to a thumb the tumb showing up on a table and on click of the thumb it revels the larger image and info inserted into a db while calling them both to a webpage I have a basic upload image script and it works great just can not fig out the data part I want the $name of the uploader and the $place the image was taken and $date. I know this is out of my league as a newbee <<--- understands this trust me. so if anyone can help me I would be a very happy person

Thank you

<?php


// filename: upload.form.php


// first let's set some variables


// make a note of the current working directory relative to root.

$directory_self = str_replace(basename($_SERVER['PHP_SELF']), '', $_SERVER['PHP_SELF']);


// make a note of the location of the upload handler

$uploadHandler = 'http://' . $_SERVER['HTTP_HOST'] . $directory_self . 'upload.processor.php';


// set a max file size for the html upload form

$max_file_size = 1300000; // size in bytes


// now echo the html page

?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"

"http://www.w3.org/TR/html4/strict.dtd">


<html lang="en">

	<head>

		<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">

	

		<link rel="stylesheet" type="text/css" href="stylesheet.css">

		

		<title>Upload form</title>

	

	</head>

	

	<body>

	

	<form id="Upload" action="<?php echo $uploadHandler ?>" enctype="multipart/form-data" method="post">

	

		<h1>

			Upload form

		</h1>

		

		<p>

			<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max_file_size ?>">

		</p>

		

		<p>

			<label for="file">File to upload:</label>

			<input id="file" type="file" name="file">

		</p>

				

		<p>

			<label for="submit">Press to...</label>

			<input id="submit" type="submit" name="submit" value="Upload me!">

		</p>

	

	</form>

	

	

	</body>


</html>





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users