Android Php Server Connection - php

I am trying to make an android app with php in a backend. In this login page I am trying to send login credentials to php file so I can echo that and store that value in variables. And also My php file is stored on server of www.myurl.com/myfolder/login.php. I know a lot more about web development but this is my first experiment with android app. I even referred several online tutorials for this. All I see is using JSON and json_encode in php but that is not solving my problem. I think I am making some other mistake or is not able to locate an error.

Related

Error Logs from Hybrid Mobile App that loads a PHP file

I just wanna ask if any Mobile especially Hybrid App developer here know how to see error logs from a loaded php file.
I have a hybrid app that will post data to a php file from my website and that php file will load in the screen of my hybrid app, everything is fine, data were received by php and mysql but I wasn't able to see the image file in the location where I designated it. I have no idea what kind of error it could be so I realised that I'm not using anything to see any error logs from a php file that loaded in my hybrid app, all I can do is to see error logs from the hybrid app itself by using Safari Develop Features(for iOS). Can anyone suggest a solution for this? Thank you!

If the WebView in my Xcode app works why would it not work in my Android app?

Today I started my first android app using "Android Studio". I have created a WebView app that displays a PHP scripts which has a HTML form with one input field and a submit button. Once the correct user code is entered the PHP script checks if the user code is correct. If correct opens another PHP script displaying data. At least that what it should do.
I already have a App written in Mac Xcode which works as expected and accessing the PHP using a browser works find.
The PHP script using PHP SESSION variables but the Android app does not seem to like them.
The problem seems to be related to how cookies are handled by Android's WebView.
By default, cookies are not enabled, therefore even if PHP tries to store the session_id, it cannot retrieve it later, and this causes a new session to start.
On SO you can find many answers that explain you how to enable cookies for WebView. See for example this one: How to enable cookies in Android WebView?.

How to connect to external database for PhoneGap

I am using a simple log in page as a start page to my application. When details entered, the app will check details with an external mySQL database and come back to connect or give error message. I am doing all these via php and all files are with .php extension.
But how do I do this with PhoneGap? I read around and php is not recognized on PhoneGap and moreover I can no longer place my php files on the server side. All files are going to be compiled via phonegap build which would sit on the mobile device itself.
How do I connect to my external mySQL database for PhoneGap? Seen the following guide which does uses a php script. I tried and it is not working. I don't get how it would work anyway since I can't place my php script on a server side.
Guide

how to make server who receive file from android app?

I am android developer and zero at back end process. Whats stuff/tools require for making a server/website that receives files from android app. I listen somewhere that php code is required as backend on server side. Is is true?
hoping for detailed explanation. Sorry for my english.
Thanks.
need php file for coonecting with database.use phpmyadmin(xampp)
tool for creating database.then create phpfile n post on server or localhost. after that use url in android.like our php link is localhost:80/phpproj/trial.php
and pass value to database using asyctask method.

php - Android User Registration and Login

I'm trying to write an Android Registration and Log in system. I looked at the code here https://github.com/andreipop/Android-Login-App as a reference. The data was saved in sqlite in that example. I was wondering how could I transfer the database to my server? probably use php with mySQL? Thanks,
you have to know a little bit of mysql and also have knowledge of PHP, you can go to 000webhost.com and create an account which lets you host websites with access to mysql for free.There you can easily test your code in php & mysql for free.

Categories