Uutiset:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu
Advertisement:

Convert Textarea to Variable

Aloittaja lordtron, elokuu 02, 2008, 05:46:17 IP

« edellinen - seuraava »

lordtron

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???

VainSoftGames.com - New Design To Gaming

aldo

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"]

lordtron

Yeah that wouldn't work and textarea's do allow code functions where you put Default Value.
So that would be a no go.

VainSoftGames.com - New Design To Gaming

Advertisement: