Page 1 of 1
Add textarea to Simple Upload Script
Posted: 16 Dec 2016, 03:18
by JanMolendijk
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
https://coursesweb.net/php-mysql/simple- ... -script_s2
Add textarea to Simple Upload Script
Posted: 16 Dec 2016, 06:26
by Admin
Hello
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" />
</form>
- 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..
}
Add textarea to Simple Upload Script
Posted: 16 Dec 2016, 09:36
by JanMolendijk
i wanna associate a textarea for the right uploadmap for my pictures
Add textarea to Simple Upload Script
Posted: 16 Dec 2016, 11:09
by Admin
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.