1. #1
    Ext User reang's Avatar
    Join Date
    Mar 2007
    Location
    Indonesia
    Posts
    60
    Vote Rating
    0
    reang is on a distinguished road

      0  

    Default Save Form Data To Server with PHP

    Save Form Data To Server with PHP


    hi all....

    i have problem :
    1. How to save data from Form to Database with PHP.
    2. How to search data from table on Datbase with PHP and show the result in Grid .

    regards.

  2. #2
    Ext User
    Join Date
    Mar 2007
    Posts
    110
    Vote Rating
    0
    pex is on a distinguished road

      0  

    Default


    Quote Originally Posted by reang View Post
    1. How to save data from Form to Database with PHP.
    This doesn't have a lot to do with Ext, it's more a PHP related question. However, getting the data from the Form is where Ext could help you. You can intercept a Form submit and relay that result to a php script (asynchronous) which then handles the insertion in the database.
    You could also simply have the form submit and handle the form submission without any Ajax.

    The form data is stored in a global $_POST array accessible from your .php file. Inserting the data in your database depends a lot on how you wanne go about this.

    A simple approach and by no means a scalable one, is to loop through every $_POST variable and generate the (SQL) INSERT queries based on these values. The newest version of PHP provides some very nice functions to allow you to do things like this. I suggest you look into this. (for MySQL http://nl2.php.net/manual/en/ref.mysql.php)

    The better approach would be to use some sort of DAO (Data Access Object) - a DAO provides you with an interface that allows you to simply update a dbase table by providing a $_POST array. For example $dao->setFrom($_POST);

    In short it is really hard to answer your question since it depends on a lot of things like the database you use, the libraries you use etc. Find some manuals about Database abstraction and DAO, read them and make them your own!

  3. #3
    Ext User reang's Avatar
    Join Date
    Mar 2007
    Location
    Indonesia
    Posts
    60
    Vote Rating
    0
    reang is on a distinguished road

      0  

    Default


    can you type in simple code? i not yet understand about technique using EXTJS...

  4. #4
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    Virginia, USA
    Posts
    220
    Vote Rating
    0
    dfenwick will become famous soon enough

      0  

    Default


    Quote Originally Posted by reang View Post
    hi all....

    i have problem :
    1. How to save data from Form to Database with PHP.
    2. How to search data from table on Datbase with PHP and show the result in Grid .

    regards.
    Grid tutorial:

    http://www.extjs.com/forum/showthrea...=grid+tutorial

    The form engine is pretty new. I'm sure there'll be a forthcoming tutorial for it sometime soon.

  5. #5
    Ext User reang's Avatar
    Join Date
    Mar 2007
    Location
    Indonesia
    Posts
    60
    Vote Rating
    0
    reang is on a distinguished road

      0  

    Default


    Thank's friends... its nice link...

  6. #6
    Sencha User
    Join Date
    Jan 2012
    Posts
    6
    Vote Rating
    0
    okta_vianty is on a distinguished road

      0  

    Default


    Hi, I'm a newbie in PHP & JS 4 and I need same help.

    Did you already find a solution to the problem "Save Form Data To Server with PHP", can you give me an complete example of input form to store data to database in Ext JS 4?.
    Sorry if I post in the wrong thread.

    Thanks before.

  7. #7
    Sencha User
    Join Date
    Mar 2012
    Location
    bangalore
    Posts
    14
    Vote Rating
    -1
    sushmak_bs is an unknown quantity at this point

      0  

    Default hi please help me , submit button is not working..

    hi please help me , submit button is not working..


    hi every one..

    i need send the form details to example@gmail.com on clicking submit button . am not getting how to do that please help me..


    thanks in advance

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."