Hughesy1986 Posted April 7, 2007 Share Posted April 7, 2007 Hi, I am coding a new portfolio for myself at the moment, I have pretty much done everything now, you can see here. http://www.hughesy1986.com I am coding the tutorial part, now what I am doing is in the ACP i can code the whole script in there, in a textfield, then click add tut and it stores it in a blob format in my mysql database. The problem I am having is showing the php code, im using highlight_string to show the php syntax, but when I try and insert the new tutorial with <?php ?> in the fields, it is crashing. Now im adding stripslashes to try and stop it from dieing. Does anyone know a better way to do this? Page in question http://www.hughesy1986.com/new/index.php?page=tutorials Many Thanks Glen Quote Link to comment Share on other sites More sharing options...
neel_basu Posted April 7, 2007 Share Posted April 7, 2007 showing the php code, im using highlight_string to show the php syntax, but when I try and insert the new tutorial with <?php ?> in the fields, it is crashing. Now im adding stripslashes to try and stop it from dieing. Does anyone know a better way to do this? Page in question What do you mean by crashing. Quote Link to comment Share on other sites More sharing options...
Hughesy1986 Posted April 7, 2007 Author Share Posted April 7, 2007 Ok I fixed it now, if you view the page in my first post, you will see its working now. The problem was I needed to addslashes($_POST['field']) because the <?php etc was makign the script crash. ive got it all too work now. Glen Quote Link to comment 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.