Hybrid View

  1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    3
    Vote Rating
    0
    hashimserag is on a distinguished road

      0  

    Default Error in connecting mysql database with my extjs form

    Error in connecting mysql database with my extjs form


    Im new to extjs and im trying to connect a form made by extjs to mysql database by a php file. the code i wrote looks fine to me i just cant see whats wrong, an error appears everytime i try to submit the form telling me Ext Error: you're trying to decode an invalid JSON string

    <?
    $conn = mysql_connect ("localhost", "root", "") or die (mysql_error ());
    mysql_select_db ("extjs") or die (mysql_error ());
    $q=mysql_query ("
    INSERT INTO info (to, subject, msg) VALUES ('".$_POST['to']."','".$_POST['subject']."','".$_POST['msg'].`") or die; ('{"success": "false"}');//json output to notify the insert is success or not
    if ($q) {
    echo '{"success" : "true"}';
    }
    else {
    echo '{"success" : "false"}';
    }
    ?>`
    can anyone tell me whats wrong? thank you.

  2. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,332
    Vote Rating
    83
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default we need see your response

    we need see your response


    Please take a screenshot on firebug when you get response from this php file.
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  3. #3
    Sencha User
    Join Date
    Aug 2012
    Posts
    3
    Vote Rating
    0
    hashimserag is on a distinguished road

      0  

    Default there u go..

    there u go..



  4. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,637
    Vote Rating
    400
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    You should be sending the new record back as well.

    btw, your image did not display.

    Scott.

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar