Jump to content

~~mysql -->(form+serach) ...help me~~


ahmed17

Recommended Posts

[b]hello , i  am beginner with php and mysql  and i wnat any one help me  to  do the following :[/b]
i want to create database for example  take name and age from user
and make aform which enable user to make search if he need to know any thing
and print result in page ....
:)
Link to comment
Share on other sites

[quote author=fenway link=topic=107268.msg430121#msg430121 date=1157659710]
I'm not exactly what application this is for, but there are plenty of tutorials that covers the basics of PHP/MySQL. 
[/quote]

i'll second that. you're really asking about several different things here, and the majority of what you're asking would be best answered in the PHP forum. you should break down what you're after into bite-sized pieces and try to get answers to them a piece at a time.
Link to comment
Share on other sites

ok, i'll bite. i'll help you with one piece of the puzzle: the query. if you have a variable that contains the search text, you've got to determine which field(s) you're going to run your match on and then simply use the LIKE comparison to see if you have a match:
[code]
SELECT * FROM tableName WHERE myCol LIKE '%$searchString%';
[/code]

when you run a LIKE with the '%' delimiters, you will return every record where "myCol" column contains the search string somewhere inside it.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.