setcookie("user_id", $res['user_id']);
setcookie("username", $res['username']);
setcookie("mobile", $res['phone']);
setcookie("user_email", $email);
setcookie("login", "1");
$_SESSION['user_id']=$_COOKIE['user_id'];
$_SESSION['username']=$_COOKIE['username'];
$_SESSION['mobile']=$_COOKIE['mobile'];
$_SESSION['user_email']=$_COOKIE['user_email'];
$_SESSION['login']=1;
Android code:
import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.webkit.WebView; import android.webkit.WebViewClient; public class MainActivity extends AppCompatActivity { WebView webView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); webView = (WebView) findViewById(R.id.webview); webView.setWebViewClient(new MyWebViewClient()); String url = "https://dharamart.blogspot.in"; webView.getSettings().setJavaScriptEnabled(true); webView.loadUrl(url); } private class MyWebViewClient extends WebViewClient { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true; } } }
No comments:
Post a Comment
Dharamart.blogspot.in