join form check

All the topics other than the two goes here.
  • Ads

join form check

Postby wonell » Tue Jul 28, 2009 1:59 pm

What's the syntax when entering input checks
img]http://myfreedolphinsoftware.com/dolphin/fb.jpg[/img]
wonell
Global Moderator
Global Moderator
 
Posts: 42
Joined: Tue Mar 31, 2009 7:19 pm

Re: join form check

Postby Administrator » Thu Jul 30, 2009 6:41 pm

It is used to validate user inputs.
Regards,
Praveen
Administrator
Administrator
Administrator
 
Posts: 1069
Joined: Mon Aug 25, 2008 7:18 am
Location: India

Re: join form check

Postby wonell » Fri Jul 31, 2009 6:31 pm

so for example if I wanted the users to enter only a range of zipcodes would I do this:
00000-10452 or 00001, 00002,00003 ....10452.
wonell
Global Moderator
Global Moderator
 
Posts: 42
Joined: Tue Mar 31, 2009 7:19 pm

Re: join form check

Postby wonell » Fri Aug 21, 2009 1:03 pm

you have to have the zipcode table to verify the user input

In ProfileFields table row "zip" column "Check"
return ( zipcode_check($arg0) );

add this function to inc/design.inc.php
function zipcode_check($zip)
{
$zip = strip_tags($zip);
$res = (int)db_value("SELECT `ZIPCode` FROM `ZIPCodes` where `ZIPCode`=trim('$zip')");
if ( $res )
return true;
else
return false;
}
wonell
Global Moderator
Global Moderator
 
Posts: 42
Joined: Tue Mar 31, 2009 7:19 pm

  • Ads

Return to Dolphin General Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron