Jump to content

Archived

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

ahmed17

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

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 ....
:)

Share this post


Link to post
Share on other sites
I'm not exactly what application this is for, but there are plenty of tutorials that covers the basics of PHP/MySQL. 

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
what i mean if i have samll database how i tie it with form to search via it to database
for example textbox tie with db and print result in page .............

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

×

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.