Jump to content

Recommended Posts

I have a property site and users can input property text into a text area. The problem occurs when they go back to edit the property the text does not appear in the text box if the user copied and pasted text with a dash.

 

below is the code for the text area

 

<?php                                                                          $dn = $row_prop->pdescrip;

                                                                                    $dn = str_replace("<br>", "\r\n", $dn);

                                                                                 

                                                                                    $dn = htmlentities($dn,ENT_QUOTES,"UTF-8");

                                                                                    echo "<textarea name='descrip' rows='15' style='width:525' value=\"$dn\">$dn</textarea>"; ?>

 

 

Can someone tell me how to get the text to appear after submitting copied and pasted text?

 

Link to comment
https://forums.phpfreaks.com/topic/160220-need-help/
Share on other sites

why would it matter if its copied and pasted or simply typed.. either way the text is entered into the element and then passed to php..

 

Also you might be causing an error by appling the "value" attribute to the text area...

 

should only be

 

<textarea>$VariableName</textarea>

 

 

little rusty on my code lately .. sry.. what is this again??(the quoted portion)

$row_prop "->" pdescrip

Link to comment
https://forums.phpfreaks.com/topic/160220-need-help/#findComment-845475
Share on other sites

why would it matter if its copied and pasted or simply typed.. either way the text is entered into the element and then passed to php..

 

Also you might be causing an error by appling the "value" attribute to the text area...

 

should only be

 

<textarea>$VariableName</textarea>

 

 

little rusty on my code lately .. sry.. what is this again??(the quoted portion)

$row_prop "->" pdescrip

It means that it's an attribute of class.

 

$class->classvariable

Link to comment
https://forums.phpfreaks.com/topic/160220-need-help/#findComment-845479
Share on other sites

It means that it's an attribute of class.

 

$class->classvariable

 

Don't wanna nitpick, but technically 'classvariable' would be a property, not an attribute.  Is it called an attribute in some other OOP language? Just wondering where you got that term from.

 

No where specifically  :P I wasn't using real terminology, I guess. But property and attribute mean the same thing.. In English at least :P

 

http://thesaurus.reference.com/browse/attribute

 

Link to comment
https://forums.phpfreaks.com/topic/160220-need-help/#findComment-845573
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.