Category : android-volley

im trying to make number picker with usernames picked from database by volley library. My php script response looks like this [{"username":"adam"},{"username":"tomasz"},{"username":"komercja"}] My numberpicker code look like this JSONArray arr = null; try { arr = new JSONArray(My response from php script as string); } catch (JSONException e) { e.printStackTrace(); } List<String> list = new ..

Read more

I have install my UBUNTU SERVER 20.04 on my little home server. I am trying to start a php script to put image on my phpMyAdmin database with MySQL. This is php script that is insert on my server at http://192.168.1.16/updateinfo.php: <?php $user_name = "root"; $user_pass = ""; $host_name = "http://192.168.1.16/phpmyadmin"; $db_name = "dbupload"; $con ..

Read more

I have install my UBUNTU SERVER 20.04 on my little home server. I am trying to start a php script to put image on my phpMyAdmin database with MySQL. This is php script that is insert on my server at http://192.168.1.16/updateinfo.php: <?php $user_name = "root"; $user_pass = ""; $host_name = "http://192.168.1.16/phpmyadmin"; $db_name = "dbupload"; $con ..

Read more

I am trying to access data sent from stringRequest here: public class ProductDetailActivity extends AppCompatActivity { String cart_url = "http://192.168.1.15/AndroidAppDatabaseConnection/add_to_cart.php"; String favorites_url = "http://192.168.1.15/AndroidAppDatabaseConnection/add_to_favorites.php"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_product_detail); Intent intent = getIntent(); String imageUrl = intent.getStringExtra(EXTRA_URL); String email = intent.getStringExtra("user"); final int product_id = intent.getIntExtra(EXTRA_ID, 0); String name = intent.getStringExtra(EXTRA_NAME); Double ..

Read more

<?php $host = "localhost"; $user = "******"; $pass = "******"; $dbname = "******"; $conn = mysqli_connect($host, $user, $pass,$dbname); if(!$conn){ die(‘Could not connect: ‘.mysqli_connect_error()); } else{ $a=$_POST[‘a’]; $b=$_POST[‘b’]; $target_dir="upoads"; $image=$a; if(!file_exists($target_dir)){ mkdir($target_dir,0777,true); } $one=rand()."_".time().".jpeg"; ‘$target_dir1=$target_dir."/".$one; if(file_put_contents($target_dir1,base64_decode($image))){ // echo ‘{The file has been Uploaded.}’; }’ here is how i insert my file $target_di="http://myserver.online/nostics/$target_dir1"; $sql="UPDATE rmreg SET photo ..

Read more