Jump to content

PHP Syntax


Hughesy1986

Recommended Posts

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

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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