Newbie, needs php help.

agw567

New Member
Hi,
I'm quite new to web design. I've mastered HTML and I want to add a searchable product catalog where buyers can then buy the item. I have a mysql database I am going to use, can anyone suggest the code to use for this?

Sorry if this is n the wrong place...

Thanks in advance...
 

agw567

New Member
Hi there. Welcome to the forum!

You can completely cut out the PHP and just use javascript (very simple):

http://www.btinternet.com/~st_rise/main/mainfram.htm?../scripts/search/search1.htm

That site is incredibly handy.

If you'd like to go the PHP route, and your hosting allows for PHP 5, then use this method:

http://www.knowledgesutra.com/forums/topic/35888-how-to-make-a-search-form-and-php-code/

-Lou

the second link was just what I wanted. One question. Will that display all the fields on the results, sorry if that's an obvious question.

Thanks.
 

agw567

New Member
I have used this second link and I got an error referring to the free database command. I removed that and now there is no error, it just returns no results. Any ideas?
 

agw567

New Member
This is the error:

Fatal error: Call to a member function free() on a non-object in /home/ (ftp username) /public_html/search.php on line 38
 

agw567

New Member
OK, please help. I used the PHP one, and it seems to work other than it says found: but no results. Even when the query matches exactly. Do I need to put a results table in somewhere?
 

calvinklein

New Member
Debug result using print_r

Try printing the result set using print_r($rs) to get an array structure of what data your query returned.
 
Top