New Posts  All Forums:Forum Nav:

Form validation

post #1 of 6
Thread Starter 
Was curious to know what some of you use out there. I use simple HTML/CSS, which i know is dangerous so i need to improve my design and coding skills in this area. Whats a good validation? I've seen in the past a way when someone sends through a form it clears all the code and makes it appear as just plain text but for the life of me i cant remember what it was called. I also see through searches their are ways to code it through jQuery and PHP, but which one will be ideal? I would probably just pull code and edit to my liking.
OverKill
(18 items)
 
  
CPUMotherboardGraphicsGraphics
AMD Phenom II X6 1055T Gigabyte 890FXA ATI FirePro V3800 ATI FirePro V3800 
RAMHard DriveHard DriveOptical Drive
16gb GSkill 10666 Seagate Western Digital  LG Blue Ray 
CoolingOSMonitorMonitor
stock air 7 Pro 64 bit (2)22" Acer x223w (2)23" Acer G235H 
KeyboardPowerCaseMouse
Microsoft Wireless Antec 900watt Antec 300 Wacom Tablet 
Audio
Logitech Speakers and sub 
  hide details  
Reply
OverKill
(18 items)
 
  
CPUMotherboardGraphicsGraphics
AMD Phenom II X6 1055T Gigabyte 890FXA ATI FirePro V3800 ATI FirePro V3800 
RAMHard DriveHard DriveOptical Drive
16gb GSkill 10666 Seagate Western Digital  LG Blue Ray 
CoolingOSMonitorMonitor
stock air 7 Pro 64 bit (2)22" Acer x223w (2)23" Acer G235H 
KeyboardPowerCaseMouse
Microsoft Wireless Antec 900watt Antec 300 Wacom Tablet 
Audio
Logitech Speakers and sub 
  hide details  
Reply
post #2 of 6
you should check out phps strip_tags() and filter_var() functions.
Viking
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i5 2500K @ 4.8 GHz 1.45V P8Z68-V GEN3 [2x] EVGA GeForce GTX 570 SLI [2x] Kingston HyperX 4GB 1600MHz 
Hard DriveHard DriveCoolingCooling
Crucial M4 128GB [2x] WD 320GB XSPC Single Bay Reservoir Swiftech MCP655 
CoolingCoolingOSPower
XSPC Raystorm XSPC EX240 Windows 7 Pro 64-bit Corsair HX850 
Case
Corsair Obsidian 650D 
  hide details  
Reply
Viking
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i5 2500K @ 4.8 GHz 1.45V P8Z68-V GEN3 [2x] EVGA GeForce GTX 570 SLI [2x] Kingston HyperX 4GB 1600MHz 
Hard DriveHard DriveCoolingCooling
Crucial M4 128GB [2x] WD 320GB XSPC Single Bay Reservoir Swiftech MCP655 
CoolingCoolingOSPower
XSPC Raystorm XSPC EX240 Windows 7 Pro 64-bit Corsair HX850 
Case
Corsair Obsidian 650D 
  hide details  
Reply
post #3 of 6
Thread Starter 
I will look into it and get back with you
OverKill
(18 items)
 
  
CPUMotherboardGraphicsGraphics
AMD Phenom II X6 1055T Gigabyte 890FXA ATI FirePro V3800 ATI FirePro V3800 
RAMHard DriveHard DriveOptical Drive
16gb GSkill 10666 Seagate Western Digital  LG Blue Ray 
CoolingOSMonitorMonitor
stock air 7 Pro 64 bit (2)22" Acer x223w (2)23" Acer G235H 
KeyboardPowerCaseMouse
Microsoft Wireless Antec 900watt Antec 300 Wacom Tablet 
Audio
Logitech Speakers and sub 
  hide details  
Reply
OverKill
(18 items)
 
  
CPUMotherboardGraphicsGraphics
AMD Phenom II X6 1055T Gigabyte 890FXA ATI FirePro V3800 ATI FirePro V3800 
RAMHard DriveHard DriveOptical Drive
16gb GSkill 10666 Seagate Western Digital  LG Blue Ray 
CoolingOSMonitorMonitor
stock air 7 Pro 64 bit (2)22" Acer x223w (2)23" Acer G235H 
KeyboardPowerCaseMouse
Microsoft Wireless Antec 900watt Antec 300 Wacom Tablet 
Audio
Logitech Speakers and sub 
  hide details  
Reply
post #4 of 6
Recaptcha is by far the best imho.
Gene-Z Dedi
(7 items)
 
Captain America
(6 items)
 
 
CPUMotherboardRAMHard Drive
i7 2600k @ 5.2 Ghz Asus Maximus IV Gene-Z Gskill 2133 4GB Caviar Black 
CoolingOSPower
Corsair H100 Arch x64 OCZ 650 Watt 
CPUCPUMotherboardGraphics
Intel Xeon E5-2650 Intel Xeon E5-2650 ASUS Z9PE-D8 WS XFX 6870 
RAMOS
32 GB Samsung Arch Nix 
  hide details  
Reply
Gene-Z Dedi
(7 items)
 
Captain America
(6 items)
 
 
CPUMotherboardRAMHard Drive
i7 2600k @ 5.2 Ghz Asus Maximus IV Gene-Z Gskill 2133 4GB Caviar Black 
CoolingOSPower
Corsair H100 Arch x64 OCZ 650 Watt 
CPUCPUMotherboardGraphics
Intel Xeon E5-2650 Intel Xeon E5-2650 ASUS Z9PE-D8 WS XFX 6870 
RAMOS
32 GB Samsung Arch Nix 
  hide details  
Reply
post #5 of 6
The best is to build your own validation. jQuery/javascript validation is nice for the user, because it doesn't require a page submit/reload for the user to see the results. On the other hand, if the user turns off javascript, that is a huge security hole. It's best to have a combination of both.

If you're talking about cleaning variables for a db insert, the database class you're using should provide a solution for that. For example if you were using MySQLi, you would simply call
Code:

$cleaned_var = $db->real_escape_string($variable_to_clean); 

iCode
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i5 2500K ASUS P8Z68 Deluxe 2X EVGA DS GTX 580 Superclocked SLI CORSAIR Vengeance 8GB (2x4GB) 
Hard DriveOptical DriveOSMonitor
OCZ Vertex 3 MAX IOPS Edition ASUS DRW Win 7 Ultimate x64 HP ZR30w 
KeyboardPowerCaseMouse
Logitech Ultra-Thin Illuminated Keyboard COOLER MASTER Silent Pro Gold Series 1000W LIAN LI PC-B25FWB Black Logitech MX518 
  hide details  
Reply
iCode
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i5 2500K ASUS P8Z68 Deluxe 2X EVGA DS GTX 580 Superclocked SLI CORSAIR Vengeance 8GB (2x4GB) 
Hard DriveOptical DriveOSMonitor
OCZ Vertex 3 MAX IOPS Edition ASUS DRW Win 7 Ultimate x64 HP ZR30w 
KeyboardPowerCaseMouse
Logitech Ultra-Thin Illuminated Keyboard COOLER MASTER Silent Pro Gold Series 1000W LIAN LI PC-B25FWB Black Logitech MX518 
  hide details  
Reply
post #6 of 6
Thread Starter 
Quote:
Originally Posted by SiPex View Post
The best is to build your own validation. jQuery/javascript validation is nice for the user, because it doesn't require a page submit/reload for the user to see the results. On the other hand, if the user turns off javascript, that is a huge security hole. It's best to have a combination of both.

If you're talking about cleaning variables for a db insert, the database class you're using should provide a solution for that. For example if you were using MySQLi, you would simply call
Code:

$cleaned_var = $db->real_escape_string($variable_to_clean); 

ya i have ran across a form validation with PHP and Jquery.

EDIT:
link to what i found
Edited by graphicsman - 5/11/11 at 6:42am
OverKill
(18 items)
 
  
CPUMotherboardGraphicsGraphics
AMD Phenom II X6 1055T Gigabyte 890FXA ATI FirePro V3800 ATI FirePro V3800 
RAMHard DriveHard DriveOptical Drive
16gb GSkill 10666 Seagate Western Digital  LG Blue Ray 
CoolingOSMonitorMonitor
stock air 7 Pro 64 bit (2)22" Acer x223w (2)23" Acer G235H 
KeyboardPowerCaseMouse
Microsoft Wireless Antec 900watt Antec 300 Wacom Tablet 
Audio
Logitech Speakers and sub 
  hide details  
Reply
OverKill
(18 items)
 
  
CPUMotherboardGraphicsGraphics
AMD Phenom II X6 1055T Gigabyte 890FXA ATI FirePro V3800 ATI FirePro V3800 
RAMHard DriveHard DriveOptical Drive
16gb GSkill 10666 Seagate Western Digital  LG Blue Ray 
CoolingOSMonitorMonitor
stock air 7 Pro 64 bit (2)22" Acer x223w (2)23" Acer G235H 
KeyboardPowerCaseMouse
Microsoft Wireless Antec 900watt Antec 300 Wacom Tablet 
Audio
Logitech Speakers and sub 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Web Coding