Jump to content


Photo

TEXT AREA EMPTIES


  • Please log in to reply
3 replies to this topic

#1 jcote65

jcote65

    Young Padawan

  • Members
  • Pip
  • 2 posts

Posted 15 July 2011 - 06:38 PM

Hi
I am new to PHP coding as I used to create my pages in HTML. I have a form on a site that enables the users to enter various data. I did not create the page, it came with the site, however, I did add all the fields, except for the first 2. My problem is that the description field is only on one line and I need it to be a text area. I added the information field, it does appear as a text area, but when I click on Sauvegarder (save), the field empties and of course that information is not posted.
I have attached the page with the defective coding
Both the Information and Description fields are mediumblob in the SQL table.
Any help would be greatly appreciated
Thanks

Attached Files



#2 rc69

rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 15 July 2011 - 10:25 PM

1. For the description field, you'll have to see what the puttblrowdefinputtxt() method does and either modify it, or remove the call to it and add your own html for the description field like you did with the information field.
2. For the saving the data in the information field, you might need to change the case of 'information' in the following to match the case you declare the field with (note the capital 'I' on line 109).
mysql_real_escape_string($_REQUEST['information']) // line 29
3. To get the field to display the same data you entered after posting, again i'm assuming puttblrowdefinputtxt() takes care of this for the other fields, you need to see the value after posting. So change line 109 to:
echo "<td class=\"lightstd\" width=\"$widthright\">&nbsp;<textarea rows=\"12\" name=\"Information\" cols=\"31\">".$_REQUEST['Information']."</textarea></td>";


#3 jcote65

jcote65

    Young Padawan

  • Members
  • Pip
  • 2 posts

Posted 16 July 2011 - 04:42 AM

1. For the description field, you'll have to see what the puttblrowdefinputtxt() method does and either modify it, or remove the call to it and add your own html for the description field like you did with the information field.
2. For the saving the data in the information field, you might need to change the case of 'information' in the following to match the case you declare the field with (note the capital 'I' on line 109).

mysql_real_escape_string($_REQUEST['information']) // line 29
3. To get the field to display the same data you entered after posting, again i'm assuming puttblrowdefinputtxt() takes care of this for the other fields, you need to see the value after posting. So change line 109 to:
echo "<td class=\"lightstd\" width=\"$widthright\">&nbsp;<textarea rows=\"12\" name=\"Information\" cols=\"31\">".$_REQUEST['Information']."</textarea></td>";



I tried but now I don't get anything after the word 'Ajouter' at the top of the page which is referenced in the attached file

Attached Files



#4 rc69

rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 16 July 2011 - 10:58 AM

That's because something is wrong in ./mod/postedispo-info.inc.php. I'm assuming you made a small error when making the above edits. Such an error would usually show up on the page. What level is your error reporting set to? Does anything actually show up in the source after 'Ajouter'?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users