Don't Miss

All posts by CodingBazz

About CodingBazz

  • How to get data from HTML Checkbox in PHP

    index.html <form action=”insert.php” method=”post”> <input name=”courses” type=”checkbox” value=”oop” />OOP <input name=”courses” type=”checkbox” value=”ds” />DS <input name=”courses” type=”checkbox” value=”db” />DB <input name=”courses” type=”checkbox” value=”coal” />COAL </form>   insert.php <?php $members=””; $course = $_POST; foreach($course as $selected) { $members...

    • Posted January 23, 2018
    • 0
  • How to send data from HTML to PHP

    index.html <html> <body> <form action=”action.php” method=”post”> <input required type=”text” name=”name” placeholder=”Name”><br/><br/> <input required name=”email” type=”text” placeholder=”Your Email”><br/><br/> <input required type=”text” placeholder=”Your Contact”><br/><br/> <select name=”subject”> <option>Select Subject</option> <option>Select one</option> <option>Select two</option> </select><br/><br/> <textarea name=”message” required cols=”10″ rows=”10″ placeholder=”Comments”></textarea><br/><br/>...

    • Posted January 23, 2018
    • 0
  • How to connect PHP to MySQL database XAMPP

    <?php $hostname = “localhost”; $database_name = “myschooldatabase”; $database_username = “root”; $database_password = ” “; $con=mysqli_connect(“$hostname”,”$database_username”,”$database_password”, “$database_name”) or die(“can not connect”); if($con) { echo “Connection OK”; } else { echo “Error Occurs”; } ?>  

    • Posted January 20, 2018
    • 0
  • Opens an activity on item click of listview android

    Activity.java import android.os.Bundle;import android.support.annotation.Nullable;import android.support.v7.app.AppCompatActivity;import android.widget.ArrayAdapter;import android.widget.ListView; public class ExampleActivity extends AppCompatActivity { private ListView listView;private ArrayAdapter arrayAdapter; @Overrideprotected void onCreate(@Nullable Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_main); String citiesname = getResources().getStringArray(R.array.cities_name);listView = (ListView) findViewById(R.id.list_item);ArrayAdapter adapter = new ArrayAdapter(this,R.layout.listitems,R.id.textView2,citiesname);listView.setAdapter(adapter); listView.setOnItemClickListener(new...

    • Posted January 13, 2018
    • 0
  • Get text of an item from listview android

    Activity.java import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.widget.ArrayAdapter; import android.widget.ListView; public class ExampleActivity extends AppCompatActivity { private ListView listView; private ArrayAdapter arrayAdapter; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); String citiesname = getResources().getStringArray(R.array.cities_name);...

    • Posted January 13, 2018
    • 0
  • Populate data from string array in listview android

    Activity.java import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.widget.ArrayAdapter; import android.widget.ListView; public class ExampleActivity extends AppCompatActivity { private ListView listView; private ArrayAdapter arrayAdapter; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); String countriesname = {“America”,”India”,”United Kingdom”,”America”,”India”,”United...

    • Posted January 13, 2018
    • 0
  • Populate data from resources strings file string array in listveiw android

    Activity.java import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.widget.ArrayAdapter; import android.widget.ListView; public class ExampleActivity extends AppCompatActivity { private ListView listView; private ArrayAdapter arrayAdapter; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); String citiesname = getResources().getStringArray(R.array.cities_name);...

    • Posted January 13, 2018
    • 0
  • Listview android

    Activity.java import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.widget.ArrayAdapter; import android.widget.ListView; public class ExampleActivity extends AppCompatActivity { private ListView listView; private ArrayAdapter arrayAdapter; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); String citiesname = getResources().getStringArray(R.array.cities_name);...

    • Posted January 13, 2018
    • 0
  • Spinner / dropdown in android

    Activity.java   import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.AdapterView; import android.widget.Button; import android.widget.Spinner; import android.widget.Toast; public class ExampleActivity extends AppCompatActivity { private Spinner spinner; private Button btnview; private String cityname; @Override protected void onCreate(@Nullable...

    • Posted January 11, 2018
    • 0
  • Radio Button in android

    Activity.java   import android.os.Bundle;import android.support.annotation.Nullable;import android.support.v7.app.AppCompatActivity;import android.view.View;import android.widget.Button;import android.widget.RadioButton;import android.widget.RadioGroup;import android.widget.Toast; import static android.view.View.OnClickListener; public class ExampleActivity extends AppCompatActivity { private RadioGroup radiogroupCountry; private RadioButton radcountrybtn; private Button btnview; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState);...

    • Posted January 10, 2018
    • 0