Does anyone know if it's possible to have several text fields that place the data into different spots in the same web page. If needed I could just use two pages, it doesn't really matter. I've heard this requires a PHP script, but I'm not sure how to set this up.

any help is appreciated! Thanks

Hey there,

I think the reason you haven't seen activity here lately may be because what I am also feeling a bit: confusion. I'm not entirely clear on what you mean with your request. What, specifically, are you trying to accomplish? Are you referring to text fields with the same names/ids? What do you mean when you say "place data into different spots"..? I'm a bit unclear on what you're talking about here, but am willing to try and help if you can clear it up a little.

Hey there,

I think the reason you haven't seen activity here lately may be because what I am also feeling a bit: confusion. I'm not entirely clear on what you mean with your request. What, specifically, are you trying to accomplish? Are you referring to text fields with the same names/ids? What do you mean when you say "place data into different spots"..? I'm a bit unclear on what you're talking about here, but am willing to try and help if you can clear it up a little.

Let me rephrase my question. I am trying to take data put into a textarea or field and have it show up in different parts of the webpage.

I am doing this for a question and answer document. Basically a user (ie teacher) would type several question and their answers into a text field, and they would appear in other parts of the document in a certain order. This allows them to scroll through the document or use a hyperlink and see the question, and then scroll/hyperlink to the answer.

My problem is that I don't know how to take the questions/answers typed into the text fields and place them into the desired location in the webpage without the user knowing html coding.

Does this clear up the question??

P.S. Not to push it further, but it would be nice to also have a single textarea that interprets each line as a new field. This would then allow the user to copy his or her questions into a text document to be saved for later. Like the box used in part 1 of this site: http://www.random.org/lists/

If this isn't possible, however, don't bother. I would be fine with single textfields.


THANKS!!

Member Avatar for diafol

Yes it's possible.
Your data is passed from the form to the next page (or the same page) where it is processed via the $_POST variable. You then PARSE the data - searching for return characters - and turn that data into an ARRAY.

You then have a a php array variable and can echo (display) any of individual items wherever you want. For example.

$my_questions_form = trim($_POST['questions']);
$array_questions = explode(Chr(13),$my_questions_form);

Show us what you have so far.

Thanks, I try this soon.


P.S. What I have so far is actually pretty neat. It's basically done save this issue. See the attatched for the current version. Soon I'll post the finished version here as well.

I views best in internet explorer because that's the browser I expect most of the users will be using, but it works fine in other browsers like firefox or google chrome--it just looks a little funky, especially with check boxes. Also you can't save it yet, and the music is saved on my computer, so that won't work either.

Other than that it works fine! Just save the txt as an htm to view the file(won't upload as an html)

Member Avatar for diafol

Hmm, OK. How about a screenshot or a live page.

Yes it's possible.
Your data is passed from the form to the next page (or the same page) where it is processed via the $_POST variable. You then PARSE the data - searching for return characters - and turn that data into an ARRAY.

You then have a a php array variable and can echo (display) any of individual items wherever you want. For example.

$my_questions_form = trim($_POST['questions']);
$array_questions = explode(Chr(13),$my_questions_form);

Show us what you have so far.

OK, I thought I had it, then I lost it. How many php pages and html pages am I supposed to have, and what goes on each of them? In other words, where the heck does all this stuff go?

Thanks! I appreciate any help you could give me!

I'll see what I can do about the screen shot. It won't let me add the html form of the doc. The easiest thing to do is just open the document, save it as an .htm and open the html.

Member Avatar for diafol

So you want me to do that? You could post the code inside code tags. Don't see why I should have to download, rename, browse.

OK, new idea. Go this this url in a few minutes, It'll be posted there. Later I'll add the sound and eventually allow a user to save the changes.

URL: http://commandgeek.webs.com/jeo.htm

--please give me about 5-10 mins to post this!!!

Member Avatar for diafol

ain't loading. may come back to you tomorrow - fazed.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.