|
-
Jan 12th, 2011, 10:13 AM
#1
Thread Starter
Fanatic Member
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
-
Jan 12th, 2011, 06:37 PM
#2
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
-
Jan 13th, 2011, 06:16 AM
#3
Thread Starter
Fanatic Member
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
-
Jan 14th, 2011, 02:06 AM
#4
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.
-
Jan 14th, 2011, 01:32 PM
#5
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|