Thread: Donate page
View Single Post
  #7  
Old 08-24-2010, 03:17 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Donate page

Yes you need to do that in the php file responsible for processing the form. Something like
var1 -dropdown
var2 - text field

P.S. same happened to me - forum submitted before I finished

PHP Code:
if (!empty($var2)) {
 
# use text field value
 
if (!is_numeric($var2))
  
$error true;
  
# if field value is not a number throw an error, process it and redirect back to the form for re-submision
 
else
  
# if field value is a number
  
$var2 intval($var2);
 
# do more php stuff
} else {
 
# if text field is empty use dropdown value
 
$var1 intval($var1);
 
# do more php stuff

__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote