473,382 Members | 1,386 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Insert Text From TEXTAREA into MySQL

Hi,

I'm trying to figure out how to INSERT/UPDATE text from TEXAREA into
MySQL. Because TEXAREA has no VALUE, I'm hitting a brick wall here.

Thanks!

May 15 '06 #1
4 5805
Rik
TristaSD wrote:
Hi,

I'm trying to figure out how to INSERT/UPDATE text from TEXAREA into
MySQL. Because TEXAREA has no VALUE, I'm hitting a brick wall here.


Euhm, I have no clue what a TEXAREA is, but for a textarea's it's pretty
straight forward. Echo existing content between the tags, and just read
$_POST['name of your textarea'] if the form method is post....
http://www.w3schools.com/tags/tag_textarea.asp
Grtz,
--
Rik Wasmus
May 15 '06 #2
Rik,

Could you give me an example? I'm not following you.
Rik wrote:
TristaSD wrote:
Hi,

I'm trying to figure out how to INSERT/UPDATE text from TEXAREA into
MySQL. Because TEXAREA has no VALUE, I'm hitting a brick wall here.


Euhm, I have no clue what a TEXAREA is, but for a textarea's it's pretty
straight forward. Echo existing content between the tags, and just read
$_POST['name of your textarea'] if the form method is post....
http://www.w3schools.com/tags/tag_textarea.asp
Grtz,
--
Rik Wasmus


May 15 '06 #3
Rik
TristaSD wrote:
Could you give me an example? I'm not following you.


1. Learn to quote.
2. some pseudocode, I'm not going to write it all out, protect against SQL
injection, and so on:

<?php

if(isset($_POST['submit'])){
mysql_query("UPDATE table SET field='".$_POST['my_textfield']."' WHERE
something");
} else {
$field= mysql_query('SELECT field FROM table WHERE something');
echo "<textarea name='my_textfield'>$field</textarea>";
}
?>

Grtz,
--
Rik Wasmus
May 15 '06 #4
<textarea name="text" rows="15" cols="40"></textarea><br/>

May 15 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Max | last post by:
i want to insert a predefined string in a textarea when i right click on the mouse. i need to do it in internet explorer and mozilla.
2
by: Lloyd | last post by:
I am trying to insert text in a text area. I need to insert one set of values on the left side of the text area and have corresponding values on the left side of the text area in an even column....
5
by: Gunnar Kristiansen | last post by:
Hi! I have a form page which I am using as a frontend for my MySql database (for writing news). I do miss the functionality of a few buttons that could help me insert HTML tags etc, into my main...
0
by: Jose Angel Campos | last post by:
Hi, I will like to know if you know how to do it. I have this code for read google news and I want to added to my DB MYSQL so I can store the news for reading went I want. Here is the code I use...
2
by: blitzztriger | last post by:
Hello!! how do i insert values into mysql , after parsing a submiting textbox?? I made the arrays, so this should be a basic insertion of them in the db, but something is missing, or in the wrong...
3
by: ctrap | last post by:
Hi Everyone, Here's my situation: I'm making a website for an employment agency, there is a page where potential employees can visit and "pre-register". When the submit button is hit the...
58
by: bonneylake | last post by:
Hey Everyone, Well recently i been inserting multiple fields for a section in my form called "serial". Well now i am trying to insert multiple fields for the not only the serial section but also...
5
ddtpmyra
by: ddtpmyra | last post by:
Hello, Im having problem and I dont know why where it coming from, maybe you can help. Files: create_topic.php <form id="form1" name="form1" method="post" action="add_topic.php"> <td>...
0
by: brianrpsgt1 | last post by:
I am attempting to insert data from a HTML form using a .psp script. I can not find how to link the data that is inserted into the form to the variables in the .psp script to then insert into the...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.