zero-perfoliate
zero-perfoliate

Author Topic: inserting large textfields into variables  (Read 182 times)

Offline lwaterfo

  • New PHP Members
  • Posts: 1
  • Karma: +0/-0
inserting large textfields into variables
« on: July 31, 2010, 06:26:01 AM »
HI,
I have a form with a huge textarea field and I am not sure how to format the textarea to make it work with php.

 I tried testing a simple field using a small texarea that was virtually wrapped named largetextfield.  For some reason, the textarea is not being inserted into my database.  I think the actual php code is working fine because I am not getting any error messages, but I am not sure...
Here is my php code:

<?$firstname=$_POST['First_Name']; $email=$_POST['E_mail']; $lastname=$_POST['Last_Name']; $largefield=$_POST['largefield']; mysql_connect("localhost", xxxxxxxx", "xxxxxxxx") or die(mysql_error()); mysql_select_db("xxxxxxxx") or die(mysql_error()); mysql_query("INSERT INTO `data` VALUES ('$firstname', '$email', '$lastname', '$largefield')"); Print "Your information has been successfully added to the database."; ?>

Can anyone help me??

Offline TinMonkey

  • PHP Workers
  • **
  • Posts: 5
  • Karma: +0/-0
Re: inserting large textfields into variables
« Reply #1 on: August 07, 2010, 02:54:09 AM »
you said the text field is named largetextfield but you are inserting $_POST['largefield'].
There are no errors, but are just inserting a null variable.