Posted by scott Johnson on 11/20/21 11:29
I would recommend that you do read the sources that Andy and Robizzle
sent but here is a down and dirty way to do it.
Your 'textarea' will send the data just like all the other fields and
can be accessed in the $_POST[] globalvariable array.
So if you set a text filed like:
<textarea name="MyData" cols="30" rows="3" id="MyData"><?php echo
$my_data;?></textarea>
The the data sent will be in the variable $_POST['MyData'].
Then on your processing page just retrieve that data and place it in
your database.
It is probably a good idea to make sure the Table Field is a 'text'
field type to handle large inputs or such.
$my_data = $_POST['MyData'];
$insert = "INSERT INTO tableName(MyData)VALUES($my_data)";
I hope this is what you are looking for.
If you need more help or more details on error checking or such post
here or write me at: scottyj1@cox.net
http://www.seaforthsailingclub.com
Jeanine wrote:
> I'am new to php and have a question.
> I have a php form with a textarea (name = MyData) and like to add the text
> to a variable.
> After that i 'd like to store this info to my database.
>
> How can i add this text to a variable ?
>
> I appreciate some help,
>
> Jeanine
>
>
Navigation:
[Reply to this message]
|