PHP forms/security

This is a discussion on "PHP forms/security" within the PHP Forum section. This forum, and the thread "PHP forms/security are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 26th, 2005, 09:37
Up'n'Coming Member
Join Date: Sep 2005
Location: athens
Age: 25
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
PHP forms/security

Hi all,
I don't know much about security and stuff. I just wanted to know whether I have to take any precautions in a PHP form I have written, from which the user can extract data from my SQL database.
In most fields supplied by the form, users can enter digits and/or text.
Do I need to check/validate anything?
Any hints on how to start or any tutorial suggestions?

Thanx
Reply With Quote

  #2 (permalink)  
Old Sep 26th, 2005, 14:56
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sypher
First off i use basic html validation such as limit a field length etc.

Then i use preg_replace to change any tags such as <input>.
If its for an email address you may also want to validate the domain.
Reply With Quote
  #3 (permalink)  
Old Sep 26th, 2005, 18:41
Reputable Member
Join Date: Sep 2005
Location: Canada, BC
Age: 24
Posts: 239
Thanks: 0
Thanked 0 Times in 0 Posts
Don't trust the html length restrictions, http posts don't have to come from a browser, and browsers don't nessicsarly enforce the rule.
Reply With Quote
Reply

Tags
php, formssecurity

Thread Tools

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
CMS Security ChrisTheSoul Web Page Design 5 Feb 21st, 2008 16:28
php security saltedm8 PHP Forum 22 Sep 27th, 2007 09:22
Security using forms thegarrett Classic ASP 1 Apr 13th, 2007 16:38
Help with security wiggles Website Planning 16 Apr 9th, 2007 22:28


All times are GMT. The time now is 01:49.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43