It is currently Mon Sep 06, 2010 6:15 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: hi all i am new here and need this help really bad
PostPosted: Sat Feb 06, 2010 11:29 am 
New php-forum User
New php-forum User
Joined: Sat Feb 06, 2010 11:21 am
Posts: 1

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 :D


i am really beginner at this so i may ask allot even when the answer is in front of me :?


Offline
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 8 hours


 Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Sponsored by Dreamlink Web hosting and Traduzioni Rumeno Italiano and ASSP Deluxe for cPanel.

 
cron