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
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)
Link to comment
Share on other sites

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]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.