Simple Machines Community Forum

General Community => Scripting Help => Aiheen aloitti: lordtron - elokuu 02, 2008, 05:46:17 IP

Otsikko: Convert Textarea to Variable
Kirjoitti: lordtron - elokuu 02, 2008, 05:46:17 IP
How would I convert a Textarea that is assigned to a PHP Form Script to = a Variable?


Here is the code I am using.

<font face="Verdana" size="2" color="#000000">Name</font>
<input type="text" name="FieldData0" value="<?php $info['realName'?>" maxlength="100" size="58">


I don't want it to be a Textarea, cause if I use SSI then I can pull the name from the database. So how can I convert this.
I have to keep the name="FieldData0" somehow or the PHP Script will go nuts. Any ideas?


OR

Can I have the membername be in the value of the Textarea? How would I pull the username from the database to put it in the Textarea value???
Otsikko: Re: Convert Textarea to Variable
Kirjoitti: aldo - elokuu 04, 2008, 11:01:11 IP
You would do <textarea name="NAME_OF_FIELD">DEFAULT VALUE</textarea>, and on submit you would get it by $_GET/$_POST/$_REQUEST["NAME_OF_FIELD"]
Otsikko: Re: Convert Textarea to Variable
Kirjoitti: lordtron - elokuu 04, 2008, 11:31:01 IP
Yeah that wouldn't work and textarea's do allow code functions where you put Default Value.
So that would be a no go.