0

If i type into my text area in my form, and submit it, it carries the data/text over to my db with no problem. However, if any text is copied from a browser into that text area and then submitted, the form posts a null. What am I doing wrong? All of my 's are working just fine, just the text area will not post anything copied. Any advice?

Here is my text area in my table:

  <tr>
      <th valign="top"><label class="biotextTitle">Bio/Info</label></th>
      <td valign="top"><textarea name="bioLinks" cols="55" rows="25" 
      class="bigboxtext" id="bioLinks" value="<?php echo $bio;  ?>">
      </textarea></td>
  </tr>

My db settings look like this:

 $fname = $_GET['FName'];
 $mname = $_GET['MName'];
 $lname = $_GET['LName'];
 $suff = $_GET['Suffix'];
 $dept = $_GET['Dept'];
 $tit = $_GET['Title'];
 $tit2 = $_GET['Title2'];
 $tit3 = $_GET['Title3'];
 $ed = $_GET['Education'];
 $ed2 = $_GET['Education2'];
 $ed3 = $_GET['Education3'];
 $ph1 = $_GET['PH1'];
 $ph2 = $_GET['PH2'];
 $em = $_GET['Email'];
 $image = $_GET['LinkName'];
 $bio = mysql_real_escape_string($_GET['bioLinks']);
 $tags = $_GET['Tags'];
 $keywords= json_encode($_GET['Keyword_ID']);
 $assocs= json_encode($_GET['Associations']);

 $sql="UPDATE 
     profileTable 

 SET Photo='".$image."', FirName='".$fname."', MName='".$mname."', LaName='".$lname."',
   Suffix='".$suff."',  Dept='".$dept."', Title='".$tit."', Title2='".$tit2."',
   Title3='".$tit3."', Education='".$ed."', Education2='".$ed2."', 
   Education3='".$ed3."', PH1='".$ph1."', PH2='".$ph2."', Email='".$em."', 
   BioLK='".$bio."', Keyword_ID='".$keywords."', Tags='".$tags."',
   Associations='".$assocs."'

 WHERE source_ID='".$sid."'";
MizAkita
  • 1,115
  • 5
  • 21
  • 52
  • which browser are you using ? Have you tried different browsers ? – Pedro Lobito Jan 08 '14 at 17:14
  • I am working in both FF and Chrome... its so weird! I can input the text from my keyboard and it works, but then when I copy it in, it does not carry over. Hmmm... – MizAkita Jan 08 '14 at 17:53
  • you should try it on a different computer. – Pedro Lobito Jan 08 '14 at 18:27
  • That's what im thinking... wondering if jquery would pass the value off correctly. it could be some of my plugins... not 100% sure. Going to try a few more things. – MizAkita Jan 08 '14 at 18:34
  • Check this out, it's work. I had try it! http://stackoverflow.com/questions/21667399/copy-paste-from-word-to-html?answertab=votes#tab-top – mango23 Mar 19 '14 at 15:37

2 Answers2

2

textarea doesn't have attribute value but you need to put your value between tag <textarea> and </textarea> try this

<textarea name="bioLinks" cols="55" rows="25" class="bigboxtext" id="bioLinks">
     <?php echo $bio;  ?>
</textarea>
Alessandro Minoccheri
  • 35,521
  • 22
  • 122
  • 171
  • Weird because im still getting the same result. No post into the db... nothing just a null row. Hmmm... let me edit my answer with my db settings... not sure why the input fields update just fine but nothing for textarea. – MizAkita Jan 08 '14 at 17:34
1

Value isn't used on textarea, also you non't need to use echo, try this:

<textarea name="bioLinks" cols="55" rows="25" class="bigboxtext" id="bioLinks">
<?php=$bio?>
</textarea>

if short tags are enabled, you can use:

<?=$bio?>
Pedro Lobito
  • 94,083
  • 31
  • 258
  • 268