Solved

will the data be added in the database?

Posted on 2009-07-06
4
212 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

747 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