title: editText message is not getting saved into the database
body: <p>I am stuck where my editText message in android is not getting stored int he database and i cannot find the problem. I am quite new to programing so any help here would be much appritiated.</p>
  
  <p>MY Php file:</p>
  
  <pre><code>    &lt;?php
  
  $DB_HOST = "localhost";
  $DB_USER = "root";
  $DB_PASSWORD = "";
  $DB_DATABASE = "vas_uporabniki";
  
  $conn = mysqli_connect($DB_HOST, $DB_USER, $DB_PASSWORD, $DB_DATABASE);
  
  $jakost_bolecine = $_POST["jakost_bolecine_post"];
  
  $mysqli_qry ="INSERT into test (jakost_bolecine,datum_in_cas) 
  values ('$jakost_bolecine', CURRENT_TIMESTAMP())";
  
  if($conn-&gt;query($mysqli_qry)=== TRUE){
  
      echo "Uspešno shranjeno";
  }
  else {
  
      echo "Napaka pri shranjevanju".$mysqli_qry."&lt;br&gt;".$conn-&gt;error;
  }
  $conn-&gt;close();
  
  ?&gt;
  </code></pre>
  
  <p>My mainactivity file:</p>
  
  <pre><code>public class MainActivity extends ActionBarActivity {
  
     // private TextView test;
      private TextView textView;
      private ImageView imageView;
      private SeekBar seekBar;
      private TextView strI;
  
      EditText test;
  
  
      @Override
       protected void onCreate(Bundle savedInstanceState) {
         super.onCreate( savedInstanceState );
         setContentView( R.layout.activity_main );
  
         seekBar = (SeekBar) findViewById( seek_bar_id );
  
          test = (EditText)findViewById(R.id.test_id);
  
         initializeVariables();
  
         textView.setText( "Jakost bolečine: " + seekBar.getProgress() + "/" + seekBar.getMax() );
  
         seekBar.setOnSeekBarChangeListener( new OnSeekBarChangeListener() {
             int progress = 0;
  
             @Override
             public void onProgressChanged(SeekBar seekBar, int progresValue, boolean fromUser) {
                 progress = progresValue;
             }
  
             @Override
             public void onStartTrackingTouch(SeekBar seekBar) {
             }
  
             @Override
             public void onStopTrackingTouch(final SeekBar seekBar) {
  
                 textView.setText( "Jakost bolečine: " + progress + "/" + seekBar.getMax() );
                 if (progress == 0) {
  
                     imageView.setImageResource( R.drawable.no_pain );
                 }
                 if (progress &lt;= 2 &amp;&amp; progress &gt;= 1) {
                     imageView.setImageResource( R.drawable.little_pain );
                     Toast.makeText( getApplicationContext(), "Blaga bolečina!", Toast.LENGTH_SHORT ).show();
                 }
  
                 if (progress &lt;= 4 &amp;&amp; progress &gt;= 3) {
                     imageView.setImageResource( R.drawable.moderata_pain );
                     Toast.makeText( getApplicationContext(), "Zmerna bolečina!", Toast.LENGTH_SHORT ).show();
                 }
  
                 if (progress &lt;= 6 &amp;&amp; progress &gt;= 5) {
                     imageView.setImageResource( R.drawable.severe_pain );
                     Toast.makeText( getApplicationContext(), "Srednja bolečina!", Toast.LENGTH_SHORT ).show();
                 }
  
                 if (progress &lt;= 8 &amp;&amp; progress &gt;= 7) {
                     imageView.setImageResource( R.drawable.very_severe_pain );
                     Toast.makeText( getApplicationContext(), "Dokaj močna bolečina!", Toast.LENGTH_SHORT ).show();
                 }
  
                 if (progress &lt;= 10 &amp;&amp; progress &gt;= 9) {
                     imageView.setImageResource( R.drawable.worst_pain );
                     Toast.makeText( getApplicationContext(), "Zelo močna bolečina!", Toast.LENGTH_SHORT ).show();
                 }
  
  
                 String strI = String.valueOf(progress);
  
  
             }
  
         } );
  
  
     }
      private void initializeVariables() {
          seekBar = (SeekBar) findViewById(R.id.seek_bar_id);
          textView = (TextView) findViewById(R.id.jakost_bolecin_id);
          //test = (TextView) findViewById(R.id.test);
          imageView=(ImageView)findViewById( R.id.slika_bolecine );
  
      }
  
      public void poslji (View view){
  
          String poslji_data = test.getText().toString().trim();
          String type ="Poslji";
          BackgroundWorker backgroundWorker = new BackgroundWorker(this);
          backgroundWorker.execute(type, poslji_data);
          }
  }
  </code></pre>
  
  <p>BackgroundWorker.java</p>
  
  <pre><code>public class BackgroundWorker extends AsyncTask&lt;String,Void,String&gt; {
  
      Context context;
      AlertDialog alertDialog;
      BackgroundWorker (Context ctx) {
          context=ctx;
      }
      @Override
      protected  String doInBackground (String... params){
          String type = params [0];
          String poslji_url= "http://localhost/vas_lestvica_login/posiljanje_podatkov/poslji_podatke.php";
          if(type.equals("Poslji")) {
              try {
                  String jakost_bolecine = params[1];
                  URL url = new URL( poslji_url );
                  HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();
                  httpURLConnection.setRequestMethod( "POST" );
                  httpURLConnection.setDoOutput( true );
                  httpURLConnection.setDoInput( true );
                  OutputStream outputStream = httpURLConnection.getOutputStream();
                  BufferedWriter bufferedWriter = new BufferedWriter( new OutputStreamWriter( outputStream, "UTF-8" ) );
                  String post_data = URLEncoder.encode( "jakost_bolecine_post", "UTF-8" ) + "=" + URLEncoder.encode( jakost_bolecine, "UTF-8");
                  bufferedWriter.write( post_data );
                  bufferedWriter.flush();
                  bufferedWriter.close();
                  InputStream inputStream = httpURLConnection.getInputStream();
                  BufferedReader bufferedReader = new BufferedReader( new InputStreamReader( inputStream, "iso-8859-1" ) );
                  String result = "";
                  String line = "";
                  while ((line = bufferedReader.readLine()) != null) {
  
                      result += line;
                  }
                  bufferedReader.close();
                  inputStream.close();
                  httpURLConnection.disconnect();
                  return result;
              } catch (MalformedURLException e) {
                  e.printStackTrace();
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
              return null;
          }
  
      }
  </code></pre>
  
  <p>And the xml main_Act:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;ScrollView
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context="com.example.rok.myapplication.MainActivity"&gt;
  
  &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"&gt;
  
      &lt;TextView
          android:paddingTop="50dp"
          android:id="@+id/krog"
          android:textSize="20dp"
          android:text="@string/povleci_krot"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:textAlignment="center"
          android:textColor="#000"/&gt;
  
      &lt;ImageView
          android:paddingTop="40dp"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:id="@+id/slika_bolecine"
          android:src="@drawable/no_pain"
          /&gt;
  
      &lt;SeekBar
          android:id="@+id/seek_bar_id"
          android:thumb="@drawable/seekbar"
          android:paddingTop="40dp"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:max="10"
          android:progress="0"
          /&gt;
  
      &lt;TextView
          android:paddingTop="40dp"
          android:id="@+id/jakost_bolecin_id"
          android:textSize="20dp"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:textAlignment="center"
          android:textColor="@color/TextMainColor"/&gt;
  
  
  
      &lt;Button
          android:id="@+id/gumb_poslji"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:background="#008000"
          android:layout_marginTop="50dp"
          android:text="@string/gumb_shrani"
          android:textAllCaps="false"
          android:textColor="@color/white"
          android:textSize="15dp"
          android:onClick="poslji"/&gt;
  
      &lt;EditText
          android:id="@+id/test_id"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:paddingTop="40dp"
          android:hint="vnesi nekaj"
          android:textAlignment="center"
          android:textColor="@color/TextMainColor"
          android:textSize="20dp"/&gt;
  
  &lt;/LinearLayout&gt;
  &lt;/ScrollView&gt;
  </code></pre>