kosmro's Profile User Rating: -----

Reputation: 3 Apprentice
Active Members
Active Posts:
63 (0.04 per day)
07-March 12
Profile Views:
Last Active:
User is offline Apr 29 2015 01:53 AM

Previous Fields

OS Preference:
Favorite Browser:
Who Cares
Favorite Processor:
Favorite Gaming Platform:
Your Car:
Who Cares
Dream Kudos:
Icon   kosmro has not set their status

Posts I've Made

  1. In Topic: Image Uploading Process Forbidden

    Posted 14 Aug 2014

    I have stated that it is receiving a 403 error from the server, so it's not a missing permission in the manifest - that would just crash.

    I have narrowed it down to my webhost now. I have sent them an email and will have to see what they have done to my server :/
  2. In Topic: Why does mcrypt return badly in HTML forms

    Posted 27 Jun 2014

    It worked!

    How irritating that I missed that minor (yet important) detail.

    I suppose therefore the encryption I'm using has a character limit? (I couldn't find this bit of info).

    Thanks so much for your help!
    Really appreciate it :D
  3. In Topic: PHP mysqli statement now not running?

    Posted 30 Mar 2014

    I have solved it!
    After way to many hours of blind stumbling, I figured out where the issue was.

    What I did, is I removed the
    , then I added print lines after each section - one when if statement true and starts, one when parameters binded, one when stmt executed, etc.
    Then I also added the following at line 27
    else{print("IF STATEMENT FAILED");}

    When I ran the code, would you believe it! I got the message "IF STATEMENT FAILED"...so the prepared statement was failing, which explains why I wasn't getting any errors like ArtificialSoldier suggested.

    To solve the issue, I removed some of the values from the prepared statement, and hallelujah! It worked :)

    For those coming across this topic, the tweaks made to the code I have put below.

    $mysqli = new mysqli('localhost', 'xxx', 'xxx', 'xxx');
       if(mysqli_connect_errno()) {
          printf("Connect failed: %s\n", mysqli_connect_error());
    	$fnm = $_POST["fnameemail"];
    	$lnm = $_POST["lnameemail"];
    	$eml = $_POST["addemail"];
    	$msgsbj = $_POST["msgsubject"];
    	$msgcont = nl2br($_POST["messageemail"]);
       if ($stmt = $mysqli->prepare("INSERT INTO tablename(id, fname, lname, qrymail, subject, message, timesub, reponded) VALUES(null, ?, ?, ?, ?, ?, NOW(), 'N')")) {
       /* Bind parameters
             s - string, b - blob, i - int, etc */
          $stmt->bind_param("sssss", $fnm, $lnm, $eml, $msgsbj, $msgcont);
    	/* Execute it */
    	/* Close statement */
       /* Close connection */

    In short, I removed the variables which weren't being used in this statement, so they will default to null.

    Thanks for all your replies!
  4. In Topic: PHP mysqli statement now not running?

    Posted 13 Mar 2014

    Absolutely nothing happens. There is no entry added, and the script then goes straight to the header location.

    The PHP Version is 5.3.27
    The Apache Version is 2.2.26

    And yes, I have made sure that the permissions are correct.
  5. In Topic: Android 4 causes crashing, but not Android 2.3?

    Posted 13 Feb 2014

    I discovered the problem. As it turns out, yes the issue occurred when the code I posted fires, but the issue was actually in the referenced bit of code. For some bizarre reason, I put all the code for UI updates, HTTP requests, JSON parseing, etc, under an AsyncTask, but I had then proceeded to run that code on the UI Thread. I found that while performance can be a little choppy at times, it worked fine under Android 2.3.2, but the Newer Android versions imposed a restriction, preventing apps from doing too much work on the UI Thread, which results in any UI tasks having to halt, or wait...which is not good anyway, so fair enough.

    I have now altered my code so that the runOnUiThread() section is now under the Post execution section, and it runs UI updates.

    It was strange, because I only did this in a particular section of the code, but no where else in the app...oh well! Fixed now. And the above explanation serves for those who stumble upon here with the same issues (maybe).

My Information

Member Title:
D.I.C Head
Age Unknown
December 4
Years Programming:
Programming Languages:

Contact Information

Click here to e-mail me
Skype  robert.kosmac


kosmro hasn't added any friends yet.


kosmro has no profile comments yet. Why not say hello?