Jump to content

Search Users


Tom10

Recommended Posts

Depends on what you need to search for, but let's say you want to search for the users last name.

 

Create a form with an input for the last name. When submitting the form, just do a search for the last name in the db using WHERE lastname = 'lastname_from_form' to get an exact match, or WHERE lastname LIKE 'lastname_from_form%' to get all that start with lastname_from_form (the % at the end is a wildcard).

 

Then display the list of matched users

Link to comment
https://forums.phpfreaks.com/topic/296346-search-users/#findComment-1511997
Share on other sites

Depends on what you need to search for, but let's say you want to search for the users last name.

 

Create a form with an input for the last name. When submitting the form, just do a search for the last name in the db using WHERE lastname = 'lastname_from_form' to get an exact match, or WHERE lastname LIKE 'lastname_from_form%' to get all that start with lastname_from_form (the % at the end is a wildcard).

 

Then display the list of matched users

 

Thanks, CroNiX i will try this! :)

Link to comment
https://forums.phpfreaks.com/topic/296346-search-users/#findComment-1511999
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.