hi all this is my first post hope i learn good stuff from the forum
so my problem is i am making a search page that well search in my mysql database i have 3 problems now
1
$sql = mysql_query("select * from remote where topic like '%$term%'");
this is used as for a search page
this well search in table remote i want to add more than that table i wanna add
4 more so total 5
and all searching in the same column (topic) how can i do that
2
if i entered ' in the search box i get an error that means its hackable
how can i fix that if u need the full source code just till me
this is the error
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in E:\wamp\www\website\searcher.php on line 61
this is line 61 while ($row = mysql_fetch_array($sql)){
3
so now i have 2 files for the search page 1 is .html and 2 is .php
if i entered .php without going to .html and type any thing in the search bar i well get an error Notice: Undefined index: term in E:\wamp\www\website\searcher.php on line 58
and in line 58 $term = $_POST['term'];
how can i add a command that if there is nothing in term it well show nothing in result
thats all hope u guys help me making a bid site need a search page
i am really beginner at this so i may ask allot even when the answer is in front of me