ecabrera Posted November 20, 2011 Share Posted November 20, 2011 im making a cms and i want the admin to see what they have not \ r n\\r stuff like that what function make it possible for that to happen Quote Link to comment https://forums.phpfreaks.com/topic/251508-cms/ Share on other sites More sharing options...
gizmola Posted November 20, 2011 Share Posted November 20, 2011 Here's an excellent summary of possible solutoins: http://www.queness.com/post/212/10-jquery-and-non-jquery-javascript-rich-text-editors Quote Link to comment https://forums.phpfreaks.com/topic/251508-cms/#findComment-1289851 Share on other sites More sharing options...
ecabrera Posted November 20, 2011 Author Share Posted November 20, 2011 i dont want to use any of that i want a simple textarea but i dont want any /n/r \\ \ to show i used stripslashes and when it displays it doesnt show any of that \n\r \\ \ it normal but when i want to add something and update it shows \n\r \\ \ Quote Link to comment https://forums.phpfreaks.com/topic/251508-cms/#findComment-1289854 Share on other sites More sharing options...
TwoSaints Posted November 21, 2011 Share Posted November 21, 2011 use stripslashes again when you load it into the textarea Quote Link to comment https://forums.phpfreaks.com/topic/251508-cms/#findComment-1289867 Share on other sites More sharing options...
ecabrera Posted November 21, 2011 Author Share Posted November 21, 2011 so like this <form action='adminpanel.php' method='POST'> <table> <tr> <td>Intro</td> <td><textarea name='intro' cols=50 rows=15><?php echo stripslashes($intro); ?></textarea></td> </tr> <tr> <td>Latest News</td> <td><textarea name='latestnews' cols=50 rows=15><?php echo stripslashes($latestnews); ?></textarea></td> </tr> <tr> <td>Main Content</td> <td><textarea name='maincontent' cols=50 rows=15><?php echo stripslashes($maincontent); ?></textarea></td> </tr> <tr> <td>Main Videos</td> <td><textarea name='mainvideos' cols=50 rows=15><?php echo stripslashes($mainvideos); ?></textarea></td> </tr> <tr> <td></td> <td><input type='submit' name='update' value='Update'></td> </tr> </table> </form> Quote Link to comment https://forums.phpfreaks.com/topic/251508-cms/#findComment-1289870 Share on other sites More sharing options...
Pikachu2000 Posted November 21, 2011 Share Posted November 21, 2011 I've already told you how to solve all of these problems you're having with backslashes, but you keep ignoring it. Why is that? Quote Link to comment https://forums.phpfreaks.com/topic/251508-cms/#findComment-1289876 Share on other sites More sharing options...
ecabrera Posted November 21, 2011 Author Share Posted November 21, 2011 becaue it doesnt not work TwoSaints is right if i use them in the textarea none of the \\ will show Quote Link to comment https://forums.phpfreaks.com/topic/251508-cms/#findComment-1289880 Share on other sites More sharing options...
Pikachu2000 Posted November 21, 2011 Share Posted November 21, 2011 The problem is with the way you are inserting the data into the database to begin with. The data is being double escaped. All you're doing is making a mess of things now because you keep ignoring good advice and putting bandaid after bandaid on things. It's going to come back to haunt you, but by that time it's going to be too late to do anything about it. Quote Link to comment https://forums.phpfreaks.com/topic/251508-cms/#findComment-1289881 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.