Jump to content

Need help


jnhayter

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.