Solved

will the data be added in the database?

Posted on 2009-07-06
4
219 Views
Last Modified: 2012-05-07
$sql = "create table idea(content longtext)";
$qid=mysql_query($sql);

in the add form can we write
content<textarea></textarea>

will the datatype match?? will the data be added in the content??
0
Comment
Question by:designersx
  • 2
  • 2
4 Comments
 
LVL 11

Expert Comment

by:BrianMM
ID: 24784783
yes... it should be fine...

From a database design end ... do you need it to be longtext (big overheads on searching/retrieving)? Below are the lengthts of text fields...

TEXT      A string with a maximum length of 65535 characters.
MEDIUMTEXT      A string with a maximum length of 16,777,215 characters.
LONGTEXT      A string with a maximum length of 4,294,967,295 characters.

0
 

Author Comment

by:designersx
ID: 24784837
sir when i am trying to add, edit the data it says undefined. will longtext do work??

suppose i have made a table in the database with datatype longtext and in my html form i am taking textarea then will the data be added in it??
0
 

Author Comment

by:designersx
ID: 24784850
it is not working for mr. i am a textarea and in the database i have taken the datatype to be longtext , hten while adding the data instead of the data getting added , undefined comes in that.
0
 
LVL 11

Accepted Solution

by:
BrianMM earned 125 total points
ID: 24785077
obviously yopu will need to give it a name like any other field... and reference it with $_POST['myrext'] or $_GET['myrext']

<textarea name="mytext">
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now