Solved

will the data be added in the database?

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
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 …

777 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