473,412 Members | 3,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

Send Text from textarea to a form

With form i dont mean file submit form.
It is just a custom 'file box' i created.

I have an upload file site where you input file, description etc.

How is it possible to make so that the text put into an <input> area with name/id="sendInfo" will be put into the custom form in a field called 'getInfo' ?

Thanks in advance if anyone can please show me an example of just this.
Aug 12 '09 #1
6 3640
Atli
5,058 Expert 4TB
Hi.

Are you talking about just moving the text from one field into another one on the same page as you type it?
If that is the case then:
Expand|Select|Wrap|Line Numbers
  1. <input onkeyup="document.getElementByID('other').value = this.value" />
If not, please elaborate. Examples are always helpful.

P.S. That is a Javascript solution, and as such depends on a browser capable/willing to execute Javascript... but that's not really a problem these days.
Aug 12 '09 #2
It is not on the same page of the site.

example:
Page one: file_uploader.php

Page two: file_list.php

in file_uploader.php you can upload a file as well as enter text into text areas for example to input file_author, description etc.

in file_list.php there is a table set that will have the results of what was inputted into the text areas from file_uploader.php,

so that when you finally click 'upload' or whatever i may call the button, all the info is relayed via php and pasted into the file_list table.

So what I really need is an example of how to do this, send whatever may be in a field named/id=file_author from file_uploader.php to another field with the same name/id (if that works) in file_list.php

thanks
Aug 12 '09 #3
dlite922
1,584 Expert 1GB
http://www.tizag.com/phpT/fileupload.php

is that what you need? how to upload files?

change your file_upload.php form's action to file_list.php. Get the file info and _POST info as you would normally.

basic PHP/programming knowledge is required.

Thanks,



Dan
Aug 12 '09 #4
The focus isnt really as much on the actual 'file' upload, but there are other textareas inside the form that contain text submitted by the file uploader.

the thing im really asking about is how to make that text transfer along with the file into the file_list?
there is a mold i created with tables that will contain the file download and file info.
Aug 12 '09 #5
dlite922
1,584 Expert 1GB
All your other form inputs should work with $_POST.

You can use $_POST along with $_FILE.

Is that what you're asking?

I'm not sure what you mean by make text transfer along the file into file_list.

"file_list": why a list?, do you have multiple file uploads?



Dan
Aug 12 '09 #6
Atli
5,058 Expert 4TB
Ok, not sure I quite follow you, but let me try...

Lets say you have a form that uploads an image, and a name for that image:
Expand|Select|Wrap|Line Numbers
  1. <form action="process.php" method="post" enctype="mutlipart/form-data">
  2.   <input type="file" name="theImage" /><br />
  3.   <input type="text" name="theCaption" /><br />
  4.   <input type="submit" />
  5. </form>
And then, in the process.php file, you simply show the image, headed by the caption:
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. $filePath = "c:\\tmp\\" .. $_FILES['theImage']['name'];
  3. move_uploaded_file($_FILES['theImage']['tmp_name'], $filePath);
  4. ?>
  5. <div>
  6.   <h1><?php echo $_POST['theCaption']; ?></h1>
  7.   <img src="<?php echo $filePath ?>" alt="The Image" />
  8. </div>
Is that what you are after?

Or are you perhaps talking about creating a list of items that have already been uploaded?
Aug 13 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Nathaniel Maier | last post by:
Hi. How can I send form results to an email address based on what the user selects? e.g. not to the same address all the time, and not to all addresses, but to the one that the user selects. How...
6
by: DigitalRick | last post by:
I have been running CDONTS in my ASPpages to send emails to me sent from my guestbook. It had been working fine untill I upgraded to Server 2003 (I am also running Exchange 2003) all locally. I...
1
by: divya | last post by:
I have a form which has a textarea,name - txtTo where he adds email addresses.Now when he clicks on sendemail I want to open a mailto link with addresses taken from textarea. Example I added...
1
by: mayanksrmcem | last post by:
I need ur help. I want to send emails through php code. but there are some problems n i'm not able to understand the actual problems. the code , i've used is as followes---- <?php if...
12
by: Geethu03 | last post by:
Hi to all I am a new member to this group. I have a problem in Email Sending using java. That is the mail is sending from my server to any desired mail account. By using the html i created the form...
1
by: Malli mindwave | last post by:
Hi, I want to send form data to given email id, I'm using mailto:ur@mail.com, but it doesn't working it dirsctly goes to localSystem A/C i.e outlook.. <form name="form1" method="post"...
1
by: maxxxxel | last post by:
Hi Can anyone help me with some asp code , I changed the code to use CDO.message instead of the old cdont.sys to send mail from a ASP webpage which works fine. Our problem is that when we send...
7
by: SAF22 | last post by:
Hi guys, I'm a pretty basic coder with very limited skills. I've been researching this question everywhere and I can't find anything that works. What I'm trying to do is simply send a form...
1
by: deepaks85 | last post by:
Dear All, I want to send some data through a form with Multiple attachment in an HTML Format. I have tried it but it is not working for me. I am able to send data without attachment but with the...
1
by: toretto | last post by:
Hello, I have a script php that I use on my website to permit visitors to send me some email with some data, this is the html table code: <table width="730" border="0" cellpadding="0"...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.