Advertisement
Guest User

Untitled

a guest
Aug 28th, 2015
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1. <?php
  2. header('Content-Type: application/json');
  3. require('config.php');
  4.  
  5.  
  6. if(isset($_GET['placeid'])){
  7.        $placeid = htmlspecialchars($_GET['placeid'], ENT_QUOTES);
  8.         $sql =mysqli_query($db,"select * from workshops, promotions, subscription WHERE workshops.google_place_id='$placeid' AND is_published=1 AND date(subscription_end_on) >= date(now()) AND workshops.id=subscription.workshop_id");
  9.  
  10.         if(mysql_num_rows($sql) > 0 ) {
  11.  
  12.  
  13.         }else {
  14.  
  15.  
  16.             return json_encode(['message' => 'invalid','data' => 'tiada']);
  17.         }
  18. }
  19. else{
  20.  
  21.  
  22. }
  23.  
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement