This is a discussion on "Block PHP Tag" within the PHP Forum section. This forum, and the thread "Block PHP Tag are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Block PHP Tag
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
||||
|
Block PHP Tag
In the comments form on my blog, it allows any text to be displayed. Now, there must be a way to say 'If the text contains any PHP code, dont allow it'. Otherwise, people can enter PHP code which is not great!
__________________
Resources Administrator
Grilling Gurus - Interviews with the Best Web Designers and Developers in the Industry Got a Question for Ryan Carson and his Web Design/Development team Carsonified? Jack Franklin - My Blog (It's a Pen in My Mouth BTW)
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
|
|
|
|
||||
|
Re: Block PHP Tag
Look into the addslashes() function
|
|
||||
|
Re: Block PHP Tag
That wont block PHP code though?
__________________
Resources Administrator
Grilling Gurus - Interviews with the Best Web Designers and Developers in the Industry Got a Question for Ryan Carson and his Web Design/Development team Carsonified? Jack Franklin - My Blog (It's a Pen in My Mouth BTW)
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
|
|
||||
|
Re: Block PHP Tag
And they can't really execute and PHP code unless your are stupid enough to use eval() on the comment string. They can however try to print out variables such as DB passwords and also use malicious HTML and JS. addslashes() and htmlentities() can counter this.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Last edited by alexgeek; Feb 13th, 2008 at 18:27. |
|
||||
|
Re: Block PHP Tag
i have no idea, but i did do this, might work
Last Blog Entry: Basic Advice for newbies (Feb 1st, 2008)
|
|
|||
|
Re: Block PHP Tag
If you want, you may use regular expressions.
Last Blog Entry: Cross browser nuisance (Feb 11th, 2008)
Last edited by RohanShenoy; Feb 14th, 2008 at 05:35. |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Block Architecture | sameer | Free Web Site Critique | 9 | Nov 14th, 2007 12:42 |
| new kid on the block | lozfromaus | Introduce Yourself | 16 | Jul 13th, 2007 12:02 |
| New Kid on the Block:) | carib | Introduce Yourself | 8 | Apr 25th, 2007 00:54 |
| New Man on the Block | phillyphreak | Introduce Yourself | 6 | Jul 1st, 2005 16:55 |
| New guy on the block | Anonymous User | Introduce Yourself | 3 | Jan 31st, 2005 13:04 |