How Can I Search In My Site ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
saqib389
Forum Commoner
Posts: 44
Joined: Wed Nov 30, 2005 2:13 am

How Can I Search In My Site ?

Post by saqib389 »

i have a music website....
i want that there would b a search option.. whenever user type some file name of song in search text box.... then if that song is available in site then user required song which he searched........ comes on next page ?

can any one tell me ?
saqib389
Forum Commoner
Posts: 44
Joined: Wed Nov 30, 2005 2:13 am

Post by saqib389 »

help me guyzzzz :(
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

set up a table:

Code: Select all

$mySearch = 'some song';

SELECT title,track from mymusic where title like '%$mySearch%'
There are better ways to search, this is the most basic.
Post Reply