I have a very simple HTML form upload where the user can submit a file. This is for a very basic project and I do not need excess code (filetype verification, size restrictions, etc.. none of that please) - I just need help taking the image submitted in the form and attaching it to a PHP mail script. This image will be embedded in some Flickr API and then used to upload images to a Flickr acct via email. So again, nothing fancy. I don't need help with the Flickr API, just the php code extracting the file from the HTML form and putting it into my php script. this is what I have so far.
You can see the form and the code below it here: http://socialsoftware.purchase.edu/alys ... tsform.php
then this is all I have for the PHP end of it:
Code: Select all
<?php
$category = $_GET['tags'];
$attachment = $_GET['name']
$to = 'who28heard@photos.flickr.com';
$subject = 'tags:'.$category;
$message = $attachment;
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
?>I've been looking all over for help with this, but everything I could find was confusing and way advanced. I am a newb. Help?