/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Textarea Response

OK, here’s my code:

[CODE]<form action=”http://bigboardsresources.com/index.php?act=Msg&CODE=4&MID=1″ method=’post’>
<textarea rows=’1′ cols=’7′ name=’Post’ class=’forminput’ style=’font-size:11px;overflow:hidden’></textarea><input type=’hidden’ name=’MODE’ value=’01’><br>
<textarea rows=’1′ cols=’7′ name=’Post’ class=’forminput’ style=’font-size:11px;overflow:hidden’></textarea><input type=’hidden’ name=’MODE’ value=’01’><br><input type=’submit’ class=’prvw’ value=”>
</form>[/CODE]

Using that code sends a private message to me (I left out some coding), and inserts in the private message textbox whatever the person inputs in the textarea. However, upon clicking the “submit” button, I only receive the input of the second textarea and not the first. How would I be able to receive the inputs in both textareas, and not just the second one?

to post a comment
HTML

6 Comments(s)

Copy linkTweet thisAlerts:
@FangJul 12.2008 — Change the name values:&lt;form action="http://bigboardsresources.com/index.php?act=Msg&amp;CODE=4&amp;MID=1" method='post'&gt;
&lt;textarea rows='1' cols='7' name='Post[COLOR="Blue"][][/COLOR]' class='forminput' style='font-size:11px;overflow:hidden'&gt;&lt;/textarea&gt;&lt;input type='hidden' name='MODE' value='01'&gt;&lt;br&gt;
&lt;textarea rows='1' cols='7' name='Post[COLOR="Blue"][][/COLOR]' class='forminput' style='font-size:11px;overflow:hidden'&gt;&lt;/textarea&gt;&lt;input type='hidden' name='MODE' value='01'&gt;&lt;br&gt;&lt;input type='submit' class='prvw' value=''&gt;
&lt;/form&gt;
Then server side pickup the value as an array:$textarea1=$_POST['Post'][0];
$textarea2=$_POST['Post'][1];

The same would be required for the hidden inputs.

Alternatively give them all different names.
Copy linkTweet thisAlerts:
@Cory_RauthorJul 12.2008 — Unfortunately, I won't be able to use either of those methods.

The service I'm using doesn't allow PHP, and I can't edit the default source code, meaning "Post" is the only value I can respond to.
Copy linkTweet thisAlerts:
@ray326Jul 13.2008 — Give the second textarea a different name.
Copy linkTweet thisAlerts:
@Cory_RauthorJul 13.2008 — It doesn't work though, because the [I]name[/I] "Post" is an ID that the textarea is sending the content to.

I'm only able to edit the HTML posted above, not the HTML the textarea's are responding to.
Copy linkTweet thisAlerts:
@Cory_RauthorJul 15.2008 — That won't really help in my situation, but you just gave me an idea for an alternative. Thanks, Fang!
×

Success!

Help @Cory_R spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.27,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...