Skip to content

Instantly share code, notes, and snippets.

@EnriqueV
Created December 19, 2014 15:51
Show Gist options
  • Save EnriqueV/7a6e54a561cd28349b9d to your computer and use it in GitHub Desktop.
Save EnriqueV/7a6e54a561cd28349b9d to your computer and use it in GitHub Desktop.
<?php
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: POST, GET, OPTIONS');
include_once('includeDataphone.php');
mysql_set_charset("utf8");
$phone=$_POST['numero'];
$qry_fecha = "SELECT now() as fechaHoy,fechaExp FROM android WHERE phone='$phone'";
$qry_exe=mysql_query($qry_fecha) or die( mysql_error());
while($data_coupon = mysql_fetch_assoc($qry_exe)){
$couponArr[] = $data_coupon;
}
$output = json_encode($couponArr);
echo $output;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment