Home define session for android app that controled by php & Instagram Api
Reply: 0

define session for android app that controled by php & Instagram Api

RaziDvb
1#
RaziDvb Published in 2018-01-12 23:21:01Z

this is my php code:(i use it for send logedin users ""from instagram loginpage api"" to my database)

   <?php

   define('HOST','');
   define('USER','');
   define('PASS','A`enter code here`');
   define('DB','');

   $con = mysqli_connect(HOST,USER,PASS,DB) or die('Unable to Connect');
   mysqli_set_charset($con,"utf8");

   $id = $_POST['id'];
   $username = $_POST['username'];
   $coin= $_POST['coin'];

   $sql = "SELECT * FROM users WHERE id='$id'";
   $check = mysqli_fetch_array(mysqli_query($con,$sql));

   if(isset($check)){
   $gift2 = "UPDATE users SET username='$username' WHERE id=$id";
   mysqli_query($con,$gift2);
   echo 'exists';
   }else{
   $sql = "INSERT INTO users (id,username,coin)
    VALUES('$id','$username','$coin')";
   if(mysqli_query($con,$sql)){
    echo 'done';
    $gift = "UPDATE users SET coin=40 WHERE id=$id";
    mysqli_query($con,$gift);
    }else{
    echo 'wrong';
      }
      }
      mysqli_close($con);

              ?>

i try to write an android application for increase follower for users(who register); application work chart: users register in my app then request follower with coins; the profiles of them show to other (in app) and they follow it.

the problem is : for example: after users register ;other profiles shown up for following and after users followed profile1 &2 &3 &... get coins ;but when new profiles apper in app or when users exit from app the prosees of showing profiles start From the first profile and users should skip followed profiles to show new appered profiles.

please tell me how can i put some code to save the prosses for usersin php or java thanks

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.307793 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO