<?php

	/*header('Content-Type: application/json');
	ini_set('display_startup_errors',1);
	ini_set('display_errors',1);
	error_reporting(1);
	ini_set("log_errors", 1);
	ini_set("error_log", "php-error.log");
	date_default_timezone_set('Asia/Kolkata');

	require_once("database.php");
    $data = json_decode(trim(file_get_contents("php://input")),true);*/
	


	/*print "<table border='1' width='50%' align='center'>";

	print "<tr>
				<td>Sr No</td>
				<td>Member ID</td>
				<td>Status</td>
    	  </tr>";*/

	/*$db = new PDO('mysql:host=localhost;dbname=mybooster;', 'root', 'root');
	$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
	$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);

	$memberID = '210057020';
	$sponsorID = '210059799';




	updateSponsor($memberID, $sponsorID, $db);


	function updateSponsor($memberID, $sponsorID, $db)
	{

		$sql = "Update my_registration set sponsor_by='$sponsorID' where refer_id='$memberID'";
		echo $sql;
		echo "<br/>";
		$stmt= $db->prepare($sql);
		$stmt->execute();


		$sql2 = "select sponsor_id from my_registration where refer_id='$memberID'";
		echo $sql2;
		echo "<br/>";
		$stmt2= $db->prepare($sql2);
		$stmt2->execute();
		$result2 = $stmt2->fetch(PDO::FETCH_ASSOC);
		
		if($result2['sponsor_id'] == '210057399')
			exit;


		else
			updateSponsor($result2['sponsor_id'], $sponsorID, $db);


	}*/

?>