In need of a bit of help again. I'm trying to implement a system not to dissimilar to the posting screen on this forum (a simplified version anyway) and I want to allow the user to add a link to his posts. I've added a button that launches a javascript popup for him to enter the url which is added to the post in format along the lines of
[a href="http://www.google.co.uk"]Link Text[/a]
when the post is submitted to the database it's converted to html and is stored in mysql as
<a href=\"http://www.google.co.uk\">Link Text</a>
The quotes are escaped when submitted to the database but it seems that both the quotes and backslash already present are both escaped again when using echo. What I end up with in the final html is
<a href=\\\"http://www.google.co.uk\\\">Link Text</a>
I've tried using stripslashes when before echoing the link but it doesn't seem to have any effect.
The really frustrating thing is that I had it working a couple of days ago and I'm sure I've not changed anything :confused:
Any ideas how I can resolve this without changing what is stored in the database?


Sign In
Create Account


Back to top









