Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

will the data be added in the database?

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Google Maps API and PHP 25 49
MySQL Sub-Select Query Returning Duplicate Result 7 45
Undefined variable problem 5 22
Reference key in foreach loop 4 16
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

839 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