Results 1 to 5 of 5

Thread: Check database for what user puts into text box?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2009
    Posts
    876

    Check database for what user puts into text box?

    Hi there,

    I was wondering does anyone know the code,

    so that when a user types text into a text box and presses submit it searches the mysql database for that text? and if that text is found it will echo 'sucess' and if its not fount it will give them an error message echo 'error'

    thanks,
    Jamie

  2. #2
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Check database for what user puts into text box?

    You mean like a user logging type thing?
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    May 2009
    Posts
    876

    Re: Check database for what user puts into text box?

    Just like a search thing really, It's a code for my points script, basically i will put 'Bonus passes / codes ' in the database and tell people them every month, and if a user puts that code in the text box and presses submit, if it finds the code in the database it will then accept it and say sucess otherwise it will give them an error saying it was not fount


    Thanks,
    Jamie

  4. #4
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: Check database for what user puts into text box?

    do you have any code to get started? the basic idea is to get the value from the text box after submitting a form ($_POST array), then using a simple SELECT statement in SQL with a WHERE clause to search for a certain column to match the string entered.
    Like Archer? Check out some Sterling Archer quotes.

  5. #5
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: Check database for what user puts into text box?

    In addition, you may wish to spell Success correctly.

Posting Permissions

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



Click Here to Expand Forum to Full Width