Jump to content


Photo

Colum type ? for large chunx of text


  • Please log in to reply
3 replies to this topic

#1 Imothep

Imothep
  • Members
  • PipPip
  • Member
  • 15 posts

Posted 25 July 2006 - 04:14 PM

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

Anyone have any idea ?

#2 ryanlwh

ryanlwh
  • Staff Alumni
  • Advanced Member
  • 511 posts

Posted 25 July 2006 - 04:40 PM

can you post the processing code?? it seems like a coding error. one more thing, have you closed the textarea (</textarea>)?
Please use EDIT * 100...
Please use
or [php] * 1000...

PLEASE READ THE POSTED SOLUTIONS CAREFULLY * 1000000...

#3 leeming

leeming
  • Members
  • PipPipPip
  • Advanced Member
  • 93 posts

Posted 25 July 2006 - 04:45 PM

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

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

if($posted == 1)
{
  ...
}

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

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());

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)
Im not perfect ;) lol

#4 desithugg

desithugg
  • Members
  • PipPipPip
  • Advanced Member
  • 281 posts
  • LocationScarborough

Posted 25 July 2006 - 05:00 PM

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
<?
$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);
?>






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users