Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PHP: creating comments for news, need to disable HTML &
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
karl420
Tux's lil' helper
Tux's lil' helper


Joined: 30 Nov 2002
Posts: 142
Location: Nashville, TN, US

PostPosted: Wed Sep 17, 2003 5:03 pm    Post subject: PHP: creating comments for news, need to disable HTML & Reply with quote

ok, my site is coming along very well. i've now decided that i'd like to give authenticated users the opportunity to submit comments on news and tutorials, however this poses one security risk that I can think of, and the same goes for the forums i would like to make. when i'm submitting news (which only an admin+editor can do) i've noticed that i can put html or even php code in the body of the news article, and it works, you can imagine why i dont want normal users to be able to do this. Do i just need to delete everything between '<' and '>' before a submit? what functions might be most useful here? thanks for any help!

PS - Please don't suggest I use some forums that somebody else made, that defeats the purpose here.

Karl Haines
Back to top
View user's profile Send private message
karl420
Tux's lil' helper
Tux's lil' helper


Joined: 30 Nov 2002
Posts: 142
Location: Nashville, TN, US

PostPosted: Wed Sep 17, 2003 5:21 pm    Post subject: Reply with quote

OK, for anyone who reads this and was having the same problem, check out strip_tags.

Karl
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum