Unique code redemption web service?
Unique code redemption web service?
Out of context: Reply #7
- Started
- Last post
- 9 Responses
- vaxorcist0
you will need to program this,using something like PHP and probably in an SQL database something like psuedocode below:
$code = $_POST('code');
$code = sanitize_function($code)
// remove illegal chars,hack attempts,etc...if(sql_query("select code from list where code ='$code'")){
// they got in! OK...
// set a flag in database for this code being used,
// or simply delete from list of "OK" codes
// get address to send item,etc.. send to e-commerce fulfillment}else{
//error try agagin
}
NOTE
this assumes you have a database full of codes setup already,etc.