Simple Search Engine
Posted: Mon Nov 18, 2002 11:39 am
Hello,
I am very new to PHP and do not know MySQL, so I am trying to make a mini-search engine with just PHP. I have two questions, but first here is my code:
How do I make it so everything is not case sensitive. For example, currently if I search on my site for "Web", i will not get any results, but if i use "web" I will. Also is there an easier way of combining the two OR statements in each of the IF statements?
Thanks
Ryan
RySk8er30@Aol.com
I am very new to PHP and do not know MySQL, so I am trying to make a mini-search engine with just PHP. I have two questions, but first here is my code:
Code: Select all
<?php
if ($_POSTї'search']=='computer' OR $_POSTї'search']=='repair') {
print ("<A HREF=/repair.html>IT Worked with computer repair</A>");
}
?>
<?php
if ($_POSTї'search']=="sales" OR $_POSTї'search']=='computer'){
print ("<A HREF=/repair.html>IT Worked with computer sales</A>");
}
?>
<?php
if ($_POSTї'search']=='web' or $_POSTї'search']=='design'){
print ("<A HREF=/repair.html>IT Worked with web design</A>");
}
?>
<?php
if ($_POSTї'search']=='hosting' or $_POSTї'search']=='web'){
print ("<A HREF=/repair.html>IT Worked with web hosting</A>");
}
?>Thanks
Ryan
RySk8er30@Aol.com