Jump to content

Executing script within a blog post


SharkBait

Recommended Posts

Hi,

 

Ok trying to figure out a decent way of doing this.

 

I have a blog (www.tyleringram.com) which is custom code and what I would like to try and accomplish is be able to write in a blog post say [poll=1]. Pretty much on my site where the poll is located on the left side, I would like to try and add that into the posts that explain what the poll is about.

 

Which would be stored in the MySQL table for the post but when it gets displayed to the user reading the post the script would parse the [poll=1] and then fetch the proper script (html/code etc) which would display the poll to the user

 

Pseudo Example:

This is my blog post about a new poll. Please answer the poll:

[poll=3]

 

After the poll has been answered we'll chat about it.....

 

Script would parse the above text and then display the poll with the id of 3 to the user when they view it...

 

Hopefully this make some sense.

Link to comment
https://forums.phpfreaks.com/topic/71073-executing-script-within-a-blog-post/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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