2 ways pwd mong gawin jan ts
1. text box + button combination- where in if you type the first name or surname and when the button is click the information will display
2. text box + keypress event - while you are typing the execution of your code for searching is executed.
here's the sample query
SELECT * FROM table WHERE first_name = textbox.text OR surname = textbox.text <= the user must type the exact spelling of the user first name or last name then you can extract it.
SELECT * FROM table WHERE first_name LIKE 'textbox.text%' or sur_name LIKE 'textbox.text%'
the % sign is a wild card that means it reads from LEFT to RIGHT for example if the first_name of the user is lobaloba000 and the value of your textbox is `loba` all the records that has `loba` in their first name will display
for example:
loba1
lobaloba
loba2
loba000
those for records will appear.
I hope you got the logic and you can use the right one in your needs.