Jump to content
xisto Community
Sign in to follow this  
contactskn

Help For Creating Searching Page In Php searching data on basis of a condition.

Recommended Posts

Dear friends with help of this forum I was able to make php pages for my website. So first of all thank you very much for the help done by you. A very happy new year 2009 to you all out there.?I have one more problem out there and I would like some help from your side.?For example I have two fields in a table. name and age. I would like to have form in which I should be permitted to select the age and name and only those items in the mysql table which matches those critarias should be displayed in the rest of the page bellow. Please help me dear friends.?

Share this post


Link to post
Share on other sites

You would need to use a SQL Query with LIKE, for example:

SELECT name, age FROM table WHERE name LIKE %SearchString1% OR age LIKE %SearchString2%;

It depends what you want to search, age or name or anything, so I guess you could search mysql docs for LIKE statement and use it. :P

Share this post


Link to post
Share on other sites

You would need to use a SQL Query with LIKE, for example:

SELECT name, age FROM table WHERE name LIKE %SearchString1% OR age LIKE %SearchString2%;

It depends what you want to search, age or name or anything, so I guess you could search mysql docs for LIKE statement and use it. :P

Dear friend here I want a set of codes to enter the name and age both by the user and then search them and then display the result on the web page have you any of such codes handy with you and will you be able to provide it for me.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.