EOSERV Forum > Lounge > Need some help with HTML / PHP
Topic is locked.
Page: << 1 >>
Need some help with HTML / PHP
Author Message
Post #70615 Need some help with HTML / PHP

Erm, i've been trying to add another feature onto my PhotoBin, for personal or friend use.  Although ill probably be giving it out to the public after i add security for only photo uploads..


My question is, i have my input for my html form like so;


<input name="UploaderName" type="text"/> 


and of course, i have a submit button.  Now i have this thing called "Currently Uploaded" or something similar, and it shows what has been uploaded already.  Im trying to add a "Uploaded By:" type thingy.  My PHP code is this;


echo "Currently Uploaded Content - "; echo "("; echo $Line; echo "$file\n"; echo $Lines; echo ")"; echo $Italic; echo "Uploader:"; echo ($_POST['UploaderName']); echo $Italics; echo $Lb;


Sorry, my coding is abit messy, i dont usually give out my PHP coded XD.


Did i do this right?  I was thinking i might need to use a mysql database but there should be another way to do it other then using a database?

14 years, 5 weeks ago
Post #70623 Re: Need some help with HTML / PHP

I think it's this instead:

<?php
if ($_FILES["file"]["error"] > 0)
  {
  echo "Error: " . $_FILES["file"]["error"] . "<br />";
  }
else
  {
  echo "Upload: " . $_FILES["file"]["name"] . "<br />";
  echo "Type: " . $_FILES["file"]["type"] . "<br />";
  echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
  echo "Stored in: " . $_FILES["file"]["tmp_name"];
  }
?>


I stole this from http://www.w3schools.com/php/php_file_upload.asp, if you care

---
http://www.addipop.com
14 years, 5 weeks ago
Page: << 1 >>
Topic is locked.
EOSERV Forum > Lounge > Need some help with HTML / PHP