Jump to content

Colum type ? for large chunx of text


Imothep

Recommended Posts

Hello im using phpmyadmin to configure my tables. And i have a textarea that is supposed to submit information to the mysql table  [code]<textarea name="description" rows="10" cols="30">[/code] and my row name is "description" and i have tried using TEXT TYPE, BLOB TYPE etc it doesnt work :S

Anyone have any idea ?
Link to comment
https://forums.phpfreaks.com/topic/15602-colum-type-for-large-chunx-of-text/
Share on other sites

well say if your form tag is like this...
[code]<form method="POST" action"pagename.php?posted=1">[/code]

then you would need to write code to see if that form is submitted...

[code]if($posted == 1)
{
  ...
}[/code]

inside there.. *assuming you have already conected to your database.*

[code]mysql_query("INSERT INTO tablename (description /*any other fields to insert form the form?*/) VALUES ('$_POST[description]' /*same as last comment*/)")or die('error with query #1, debug:'.mysql_error());[/code]

some thing like that any way..

or am i not understanding, and making you sound like you dont know what your doing (sorry if ive assumed that, please give more details if so)
umm i think you should chage you're colum type to 'LongText' that shoulkd give you more than enough space.
and for the code summin like this
[code]
<?
$description = $_POST['description'];
if ($description == "")
{
echo"Sorry you didn't fill in the description field.Please go back and fill it in.S";
exit();
}
$query = "INSERT INTO yourtablename (description) VALUES ('$description')"; 
$result = mysql_query($query);
?>

[/code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.