Genrate Sequence number after clcik on submit and it should create automatic table with d same filed

Discussion in 'PHP' started by Amar505, Nov 6, 2013.

  1. #1
    Create all fileds like

    name amarnath
    address sdasjkdjksdk
    zip code esdhs
    city adoni
    cost 30
    weigt 45

    Submit button

    After giving input then have to add all to database How in PHP that too in the below Procedure...
    ????


    Whenever After clicking on submit it should generate some sequence umbers like 0000001,0000002,000003,----------9999999
    Like this ...
    After submitting the form whatever the sequence that is going to dispplay will have to create a table and store all the fiels................

    If the sequence number is 345244 then it
    has to create a table automaticallly With all the fields inside the PHP SERver.Is it Poosible and HOW????
    CAn yoyu explain in Simple language



    0​
    Trophy Points:
    0​

    #1
    Create all fileds like

    name amarnath
    address sdasjkdjksdk
    zip code esdhs
    city adoni
    cost 30
    weigt 45

    Submit button

    After giving input then have to add all to database How in PHP that too in the below Procedure...
    ????


    Whenever After clicking on submit it should generate some sequence umbers like 0000001,0000002,000003,----------9999999
    Like this ...
    After submitting the form whatever the sequence that is going to dispplay will have to create a table and store all the fiels................

    If the sequence number is 345244 then it
    has to create a table automaticallly With all the fields inside the PHP SERver.Is it Poosible and HOW????
    CAn yoyu explain in Simple language

    0​
    Trophy Points:
    0​

    #1
    Create all fileds like

    name amarnath
    address sdasjkdjksdk
    zip code esdhs
    city adoni
    cost 30
    weigt 45

    Submit button

    After giving input then have to add all to database How in PHP that too in the below Procedure...
    ????


    Whenever After clicking on submit it should generate some sequence umbers like 0000001,0000002,000003,----------9999999
    Like this ...
    After submitting the form whatever the sequence that is going to dispplay will have to create a table and store all the fiels................

    If the sequence number is 345244 then it
    has to create a table automaticallly With all the fields inside the PHP SERver.Is it Poosible and HOW????
    CAn yoyu explain in Simple language

    0​
    Trophy Points:
    0​

    #1
    Create all fileds like

    name amarnath
    address sdasjkdjksdk
    zip code esdhs
    city adoni
    cost 30
    weigt 45

    Submit button

    After giving input then have to add all to database How in PHP that too in the below Procedure...
    ????


    Whenever After clicking on submit it should generate some sequence umbers like 0000001,0000002,000003,----------9999999
    Like this ...
    After submitting the form whatever the sequence that is going to dispplay will have to create a table and store all the fiels................

    If the sequence number is 345244 then it
    has to create a table automaticallly With all the fields inside the PHP SERver.Is it Poosible and HOW????
    CAn yoyu explain in Simple language

    0​
    Trophy Points:
    0​

    #1
    Create all fileds like

    name amarnath
    address sdasjkdjksdk
    zip code esdhs
    city adoni
    cost 30
    weigt 45

    Submit button

    After giving input then have to add all to database How in PHP that too in the below Procedure...
    ????


    Whenever After clicking on submit it should generate some sequence umbers like 0000001,0000002,000003,----------9999999
    Like this ...
    After submitting the form whatever the sequence that is going to dispplay will have to create a table and store all the fiels................

    If the sequence number is 345244 then it
    has to create a table automaticallly With all the fields inside the PHP SERver.Is it Poosible and HOW????
    CAn yoyu explain in Simple language
     
    Solved! View solution.
    Amar505, Nov 6, 2013 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,897
    Likes Received:
    4,555
    Best Answers:
    123
    Trophy Points:
    665
    #2
    Create a table - or insert into a table?

    this looks pretty straightforward to me. The sequence number is an auto-increment id in the table. That number can be retrieved after inserting the record into the table.

    There are loads of tutorials on this. Check out

    https://www.google.com/search?q=php+insert+record+tutorial
     
    sarahk, Nov 6, 2013 IP
  3. Amar505

    Amar505 Greenhorn

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #3
    Whenever I click on Submit Button... It should genrate a sequence number i.e., Ex:12345 and it should automatically create a table with 12345 automatically and also Stores all the fileds in 12345 table....


    BUt sequence number aregenarted for every time...
    firstr 12345
    12346
    12347

    Whenever I Sleect 12345 It should display all fileds in by creating table...
     
    Amar505, Nov 6, 2013 IP
  4. #4
    I have to ask, why do you want to create a new table each time? It sounds like there's something seriously wrong with the design pattern you're wanting to use. Why would you want to do this?

    What's wrong with creating one table, and adding rows to it?

    As for the numbers, as @sarahk already pointed out, it's done by using an auto-increment field in your database.

    http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html
     
    nico_swd, Nov 6, 2013 IP
  5. Amar505

    Amar505 Greenhorn

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #5
    I would like to do project on post office management system

    After FIlling the form with labels,Name,address,ZIP code,PIN,CITY,WEIGHT,COST
    Whenever I click ON Submit button...... It Should generate some sequence number as 12345 ................. Whenever I perform Search operation with
    12345...
    It should provide details of all the lables and text fileds
     
    Amar505, Nov 6, 2013 IP
  6. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #6
    Okay yes, I understand what you want to do. What I don't understand is why.

    You can do all of the above using one single table. So I'm asking again... is there a specific reason you want to use multiple tables?
     
    nico_swd, Nov 6, 2013 IP
    ryan_uk and sarahk like this.
  7. Amar505

    Amar505 Greenhorn

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #7
    I dont know nothing about PHP So FAR I have to study now...Just it is my analysis.... Ok thank you for you for your response.... Will you provide sites link to learn PHP from Basics to Advanced.....
     
    Amar505, Nov 6, 2013 IP
  8. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #8
    PoPSiCLe, Nov 6, 2013 IP
    sarahk likes this.
  9. Amar505

    Amar505 Greenhorn

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #9
    SIR One more doubt......... In one Table ....It will store sequence numbers and all lables text like name,address,so on.... right sir....................


    If I perform Search Operation on one sequence number i.e, 12345 Will I t provides details llike name,Adress and so on Though all are stored in Single row in single table
     
    Amar505, Nov 6, 2013 IP
  10. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #10
    Yes. Please read up on how databases work? Pretty please? Or, just go through the tutorial I linked - it will pretty much explain everything in very simple terms.
     
    PoPSiCLe, Nov 6, 2013 IP
    sarahk likes this.
  11. Amar505

    Amar505 Greenhorn

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #11
    Ok No Need of simple words you may also explain in very complicated Now i Understood everything.............in= Need PHP code plZzz
     
    Amar505, Nov 6, 2013 IP
  12. ryan_uk

    ryan_uk Illustrious Member

    Messages:
    3,983
    Likes Received:
    1,022
    Best Answers:
    33
    Trophy Points:
    465
    #12
    Learn programming principles, learn PHP, then write your code. "Simples!"
     
    ryan_uk, Nov 6, 2013 IP
    sarahk likes this.
  13. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #13
    Yes, Sir! Yes to all, Sir!

    What you're asking for is a bit much, to be honest, Sir. The forum is for specific problems with scripts, or questions in general.

    We're happy to help you, but you're going to have to do a bit on your own.

    How to create a MySQL database:
    http://www.siteground.com/tutorials/phpmyadmin/phpmyadmin_create_database.htm

    How to set up an auto-incrementing ID:
    http://trebleclick.blogspot.com.es/2009/01/mysql-set-auto-increment-in-phpmyadmin.html

    How to insert and select data:
    http://tutorial.world.edu/web-devel...rt-select-update-delete-mysql-database-table/
     
    nico_swd, Nov 6, 2013 IP
    sarahk likes this.
  14. Amar505

    Amar505 Greenhorn

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #14
    Sir I am still a learner.... I have to learn and do this am trying a lot ot learn more
     
    Amar505, Nov 7, 2013 IP
  15. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #15
    Yes, I understand that, and you have my full support. Hence I gave you links to learn what you need to know for this project.

    If you still have doubts, keep asking.
     
    nico_swd, Nov 7, 2013 IP