Select and Insertion

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • seyz4all
    New Member
    • Aug 2008
    • 4

    Select and Insertion

    I dont know how to go about this

    i have a form that i want to retrieve data, i mean some of the textfields.

    on the top frame, i would i have 1 textfield
    ID

    and a retrieve button

    user will insert the id of the data and click on the retrieve button to retrieve the data on the bottom frame.
    /////////////////////////////////////////////////////////////////////////

    on the botton frame, i would 5 textfields. 3 are readonly from database after retrival and 2 others are not readonly, data would be inserted into those

    ID
    Name (readonly)
    Age (readonly)
    Sex
    Weight



    then a button in the bottom to submit all into the database...

    i tot of this and this is the solution to a small form i am creating, but i dont know how to create the script...

    Please anyone that can help me write this one script, or if you have a better solution to this, i would be very grateful
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    You can apply in the jobs section for freelance writes for this.

    Comment

    • nathj
      Recognized Expert Contributor
      • May 2007
      • 937

      #3
      what code do you have at present? There are many articles on this site and others that will get you started.

      You need to have a go and then ask specific code related questions or hire someone as suggested previously.

      If you have a go and get stuck post back I will be happy to help then

      nathj

      Comment

      • seyz4all
        New Member
        • Aug 2008
        • 4

        #4
        ok do you know of any article where a textfield can retrieve search result after clicking the search button

        Comment

        • nathj
          Recognized Expert Contributor
          • May 2007
          • 937

          #5
          Originally posted by seyz4all
          ok do you know of any article where a textfield can retrieve search result after clicking the search button
          What do you have so far?

          I'm assuming you have a web page with the text field on and a submit button. You then want the user to be able to enter information into the text field and click the button to search your site - is that correct?

          The next question I have, beore i can make any suggestions or recommendations is how is the site built? Is it all static HTML files or is it built form a database, or some combination of the two. What I'm getting at here is 'where is the content that is to be searched?'

          If you are searching a DB for the string entered then I can help you out, I've just don this my self and I can point you ion the right direction.

          If, however, your pages are static then I suggest you look at the free stuff from Google before we attpemt any in file searching ourselves.

          Cheers
          nathj

          Comment

          • seyz4all
            New Member
            • Aug 2008
            • 4

            #6
            Originally posted by nathj
            What do you have so far?

            I'm assuming you have a web page with the text field on and a submit button. You then want the user to be able to enter information into the text field and click the button to search your site - is that correct?

            The next question I have, beore i can make any suggestions or recommendations is how is the site built? Is it all static HTML files or is it built form a database, or some combination of the two. What I'm getting at here is 'where is the content that is to be searched?'

            If you are searching a DB for the string entered then I can help you out, I've just don this my self and I can point you ion the right direction.

            If, however, your pages are static then I suggest you look at the free stuff from Google before we attpemt any in file searching ourselves.

            Cheers
            nathj

            exactly a DB...
            the user will input the id and the result will display in textfields, not on the plain page,
            like 3 other textfields will show on the bottom frame with results, so that i can insert them into another table..

            hope u undastand this

            Comment

            • nathj
              Recognized Expert Contributor
              • May 2007
              • 937

              #7
              Originally posted by seyz4all
              exactly a DB...
              the user will input the id and the result will display in textfields, not on the plain page,
              like 3 other textfields will show on the bottom frame with results, so that i can insert them into another table..

              hope u undastand this
              Right, this is getting clearer by the post.

              The user enters a number and then you retrieve the info from the DB using that number and display the results on the page.

              I would tackle this as follows:

              1. A page with the the text box and button, not necessarily in a form.
              2. Button calls some JS that uses AJAX to pass the number entered to a PHP script.
              3. PHP script checks that it is a number, if it is NOT it returns a message to that effect. If it IS a number then the SQL is executed and the results returned as the output.

              I recommend you read the following:
              PHP DataObject
              AJAX Data Querying

              This should get you started with some code. If you get stuck with the specifics then post your code here and I'll take a look for you. I've done this sort of thing a lot, but I don't want to simply give away the code - you will learn more by doing it yourself.

              Cheers
              nathj

              Comment

              • seyz4all
                New Member
                • Aug 2008
                • 4

                #8
                thanks , i will read it...

                Comment

                Working...