Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

- - - - -

Lost in PHP in need of help


  • Please log in to reply
No replies to this topic

#1 rebelcreek


    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 20 February 2011 - 04:07 PM

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


// 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

<html lang="en">
<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>



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

Upload form

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

<label for="file">File to upload:</label>
<input id="file" type="file" name="file">

<label for="submit">Press to...</label>
<input id="submit" type="submit" name="submit" value="Upload me!">




  • 0

Also tagged with one or more of these keywords: max_file_size

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download