Skip to content

Instantly share code, notes, and snippets.

@ravikiranj
Created March 26, 2011 06:02
Show Gist options
  • Save ravikiranj/888059 to your computer and use it in GitHub Desktop.
Save ravikiranj/888059 to your computer and use it in GitHub Desktop.
HTML for Public Photo Uploader using Flickr
<body>
<div id="doc" class="yui-t7">
<div id="hd" role="banner"><h1>Photo Uploader Using Flickr</h1></div>
<div id="bd" role="main">
<div id="mainbar" class="yui-b">
<?php
if (isset($_POST['name']) && $error==0) {
echo " <h2>Your file has been uploaded to <a href='http://www.flickr.com/photos/61074807@N08/' target='_blank'>rkj_flickr's photo stream</a></h2>";
}else {
if($error == 1){
echo " <font color='red'>Please provide both name and a file</font>";
}else if($error == 2) {
echo " <font color='red'>Unable to upload your photo, please try again</font>";
}else if($error == 3){
echo " <font color='red'>Please upload JPG, JPEG, PNG or GIF image ONLY</font>";
}else if($error == 4){
echo " <font color='red'>Image size greater than 512KB, Please upload an image under 512KB</font>";
}
?>
<h2>Upload your Pic!</h2>
<form method="post" accept-charset="utf-8" enctype='multipart/form-data'>
<p>Name: &nbsp; <input type="text" name="name" value="" ></p>
<p>Picture: <input type="file" name="file"/></p>
<p><input type="submit" value="Submit"></p>
</form>
<?php
}
?>
</div>
</div>
<div id="ft"></div>
</div>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment