Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Oct 2008
    Posts
    72
    Thanks
    7
    Thanked 2 Times in 2 Posts

    Form field + engine help

    Hi,

    Is it possible to create a form that checks a pattern of user input and separate it in a form of database?

    USER enters 920000000 in a form field (0000000 are random numbers) and the code does a research and informs that it's from network YYY.

    Thanks

  2. Users who have thanked tribalmp for this post:

    masmedia (03-07-2014)

  3. #2
    Master Coder sunfighter's Avatar
    Join Date
    Jan 2011
    Location
    Washington
    Posts
    6,413
    Thanks
    30
    Thanked 878 Times in 876 Posts
    If you have a database with 920000000 related to network YYY and to nothing else than Yes we can do that, but it is not done by the form, it is done either by a server side script or javascript. Server side is the way the vast majority of coders would do it.
    Is that what your asking?
    Evolution - The non-random survival of random variants.
    Physics is actually atoms trying to understand themselves.

  4. #3
    New Coder
    Join Date
    Oct 2008
    Posts
    72
    Thanks
    7
    Thanked 2 Times in 2 Posts
    Yes, i'm looking for help in building a JavaScript that does that.

    I already have one JavaScript that does the following a user makes a search and retrieves from the database.

    Now what i'm looking for is a way that the user makes the search and the script decodes the number.

    Was i clear enough or do you need more details?

    Thanks for your time

  5. #4
    Master Coder sunfighter's Avatar
    Join Date
    Jan 2011
    Location
    Washington
    Posts
    6,413
    Thanks
    30
    Thanked 878 Times in 876 Posts
    It's done the same way the search is done. Your table has a column labeled `label_1` and in that row a column labeled `label_2`. In your form you have an <input> with the name='number' and your php looks for and sets a variable, $look_up_number and sets it equal to POST['number']. Then you do a search for `label_2` WHERE `label_1` = $look_up_number.
    Evolution - The non-random survival of random variants.
    Physics is actually atoms trying to understand themselves.

  6. #5
    New Coder
    Join Date
    Oct 2008
    Posts
    72
    Thanks
    7
    Thanked 2 Times in 2 Posts
    Sure you seem to have a good knowledge on PHP, I didn't understand the method you publish.

    Could you give some code preferably in JavaScript, that's why i post in "JavaScript programming".

    Thanks for answering


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •