Jump to content

[SOLVED] Compare two MMYY type fields


abch624

Recommended Posts

Hi There,

 

This will work partially but is not the best way.

 

I coded this:

$startyear = substr($startdate, 2,4);
	$startmonth = substr($startdate, 0,1);

	$expiryyear = substr($expirydate, 2,4);
	$expirymonth = substr($expirydate, 0,1);

	if ($expiryyear < $startyear) {
		$errors .= '&#35;Please provide correct expiry and start date for the card details. ';
	}
	if ($expiryyear == $startyear) {
		if ($expirymonth == $startmonth) {
			$errors .= '&#35;Please provide correct expiry and start date for the card details. ';
		}
	}

sorry had to say some think, in the uk it a crime to keep user's credit card information in a database due to id theft.

 

it also a very big headache if the user get the card used not via them,

usually all web sites get police investigated for fraud.

 

i strongly suggest you use a payment gate way, to take payments,

any information sent to you from the payment gateway, is there responsibility of sending it,

they wont send credit card info, but will send all important references about the current payment.

 

pay pal is a very good payment gateway and Google well known and very secure.

 

if you have set up a payment gate way with a bank or business then there  integration rules should apply.

 

once again don't hold user's payment credit cards, it can lead to long investigations.

 

 

also on the plus sign using a secure well known gateway will encourage sales.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.