<?php
include('dbconnect.php');
session_start();

	$rid = mysqli_real_escape_string($connection, $_POST['rid']);
	$verified = mysqli_real_escape_string($connection, $_POST['verified']);
	$reward = mysqli_real_escape_string($connection, $_POST['reward']);
	
	
    $query ="UPDATE referral SET verified='$verified', reward='$reward' WHERE rid='$rid'";
    $query_run = mysqli_query($connection, $query);
    if($query_run)
    {
		$_SESSION['status'] = "<p style='padding:15px; background: #4E9C81; color: #fff; border-radius:10px;'>REFERRAL SUCCESSFULLY UPDATED</p>";	
		header('location:../referral.php');
	}
    else
    {
		$_SESSION['status'] = "error.. NOT SUCCESSFULLY UPDATED";
		header('location:../referral.php');
	}		


?>