I' m make a admin site where enter text in input field in form, text example "I'm study with delhi univercity" where i am using aprostrophy ('). this text print in div same as but when this text I want print in input field for editing then only display first letter "I" and other text which are using after aprostrophy nothing display. what's problem.................. plz give the solution........... plz help............................
If you are inserting into db, could solve However, try these functions html_entities() or htmlspecialchars() or html_entity_decode() You will have a solution in one of them
echo '<input type="text" value="'.htmlspecialchars( $OLD_TEXT ).'" />'; Code (markup): And if you see slashes alongwith quotes, use if(get_magic_quotes_gpc()) $OLD_TEXT = stripslashes($OLD_TEXT); Code (markup):