Solved

will the data be added in the database?

Posted on 2009-07-06
4
244 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
[X]
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
  • 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

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…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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 …

730 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