Created
May 2, 2017 09:41
-
-
Save mskian/98b102fd27d093ac113eb95799ad08fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//status.php?id=USER_ID | |
include('db.php'); | |
if($_GET['id']) | |
{ | |
//variables | |
$id=mysqli_real_escape_string($con,$_GET["id"]); | |
//selecr from database | |
$sql_query = "SELECT * FROM referral WHERE id='$id'"; | |
$result_set=mysqli_query($con,$sql_query) or die('error'); | |
$ref_row=mysqli_fetch_array($result_set); //fetch the result from table | |
$count=$ref_row['clicks']; | |
$user=$ref_row['user']; | |
} | |
?> | |
<?php | |
if($ref_row) | |
{ | |
echo "<p>$user Refer $count Users</p>"; | |
} | |
else | |
{ | |
echo "<h1>404 Page boss</h1>"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment