Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Ok so i have a comment system
Old 06-20-2005, 02:06 PM Ok so i have a comment system
mikeroq's Avatar
Skilled Talker

Posts: 92
Name: Mike Roq
Location: Lakewood, CO
Trades: 1
How would I protect it from html and php code and SQL code?

Thanks
__________________
CodingHub.com
mikeroquemore.com
mikeroq is offline
Reply With Quote
View Public Profile Visit mikeroq's homepage!
 
 
Register now for full access!
Old 06-20-2005, 04:57 PM
Novice Talker

Posts: 9
Location: Moscow, Russia
Trades: 0
U can use htmlspecialchars() function or create your own function
for example

PHP Code:
InSql($string){
$string eregi_replace(" +"" "$string);
$string str_replace("<""& #060;"$string); 
$string str_replace(">""& #062;"$string); 
$string str_replace("\"""& #034;"$string); 
$string str_replace("'""& #146;"$string);
return 
$string;


Last edited by PiterZ; 06-20-2005 at 05:01 PM..
PiterZ is offline
Reply With Quote
View Public Profile Visit PiterZ's homepage!
 
Reply     « Reply to Ok so i have a comment system
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.09402 seconds with 12 queries