Add textarea to Simple Upload Script

User avatar
Posts: 38
Location: Holland Rotterdam

Add textarea to Simple Upload Script

Hi, i wanna use your script for uploading but i wanna
make an option in it to what map i wanna upload it with an text-area

If you want to associate a textarea to the upload, just add a <textarea> element, with a "name", in the form:

Code: Select all

<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST" enctype="multipart/form-data">
  Upload File: <input type="file" name="fileup" /><br/>
  <textarea name="txtup"></textarea><br/>
  <input type="submit" name='submit' value="Upload" />

- Then, in php get the value associated to that name:

Code: Select all

if(isset($_FILES['fileup']) && strlen($_FILES['fileup']['name']) > 1){
  $txtup = isset($_POST['txtup']) ? $_POST['txtup'] :'';
  //the rest of the code..

i wanna associate a textarea for the right uploadmap for my pictures

I not know what it is that uploadmap you refer, neither what it has to do with textarea.
Maybe you not know how to say what you want. Is a <textarea> element or an <input> text field? What is Upload-map, the folder on server where the file is uploaded?
So, tell clear what you want, or put an example and what you have tried.

Adv. Posts: 01

Similar Topics