View Full Version : PHP search engine-need some advice
darkcarnival
07-11-03, 03:10 PM
hi,
now this script isnt done yet.but i am almost done but i want to see if this is stable enough to run. now im going to add the admin file once im done w/that.if you think i should add something tell me, this is my 1st program.remember i just want to see if it is runable it doesnt work(as of yet)
darkcarnival
07-16-03, 10:20 AM
see ppl r downloadin my script but hasnt told me if it is runable or not.
the problem is we are not able to test the thing without the config.php and the mysql query execute ... so i guess for a full test to the script , pls provide these file too :D
darkcarnival
07-17-03, 09:43 AM
um did u read it, it doesnt work! i only want to see if it is coded right.once i get the admin panel done then ill allow other to fully try it.this is just to see if it is coded right.since it is my 1st program.
how are we supposed to read your code without testing it !??! heh...come on dude it's doesn't work that way... provide everything and we will be more than happy to help you out
darkcarnival
07-17-03, 08:20 PM
look i want u to look at the code NOT run it. geez just look at it and see if it is coded right. you guys are smart, just look at the source code and tell me if i coded it right. i dont want to hear if it runs good ill decide that. just want to see if it is coded like a search engine should be. im still working on the admin panel like i said so i want someone to look over the code and tell me if i coded it wrong.
i swear if i hear one more post telling to post the other files ill just find another place to help me cause u guys cant read what im typing!!
it doesn't work... you will see common errors when you actually try running the script. also you are using HTML inside of your PHP, don't do that.
...html goes here...
<?php
...php goes here...
?>
...html goes here...
Another thing I see is that your re-writing variables and connecting to the database in each IF statement. Try and lessen these by placing common variables at the top including database connections.
Chris Boulton
07-18-03, 09:11 AM
<?
/********************************\
#Metal Search v1.0
\********************************/
include ("config.php");
IF ($Choice == "Artist")
{
$VER="1.0"
$date = Date("F d, Y");
$keyword = $_GET['query']
$db_connection = mysql_connect ($DB_HOST, $DB_USER, $DB_PASS) or die ('Could not connect to MySQL: ' . mysql_error());
mysql_select_db ($DB_NAME) or die ('Could not select database: ' . mysql_error());
$query = "SELECT Name, Address, Description, Keywords FROM SSearch_Artist";
$results = mysql_query ($query) or die (mysql_error());
echo "<HTML>\n";
echo "<HEAD>\n";
echo "<TITLE>Results for $keyword</TITLE>\n";
echo "</HEAD>\n";
echo "<BODY BGCOLOR=\"#000000\" TEXT=\"$FFFFFF\" LINK=\"#66CCFF\" VLINK=\"#66CCFF\" ALINK=\"#66CCFF\">\n";
echo "<FONT FACE=\"Verdana\" SIZE=\"2\">\n";
echo "<H1>Search Result(s) for: query</H1>\n";
while ($row = mysql_fetch_array ($results, MYSQL_ASSOC)) {
echo "<A HREF=\"$row['address']\">$row['Name']</A> - $row['Description']<br />\n";
}
mysql_query("INSERT INTO SSearch_log (Date, Keyword, Choice) VALUES ($date, $keyword, $Choice);");
mysql_free_result($results);
mysql_close()
echo "<BR><BR><CENTER>Metal Search<BR>\n";
echo "$VER</CENTER>\n";
echo "</BODY>\n";
echo "</HTML>\n";
}
There is the first part rewritten into code that should work. You can use it for ideas on how to fix up the rest of the script.
Chris :)
darkcarnival
07-18-03, 10:12 AM
ok thx dude. im alittle busy wokring my site new style now but i will get that added.i could also use help on my admin panel i dont know how to show different titles w/o using <title>
look man don't give us attitude here... you don't expect someone to browse trough your crap and give him attitude. We're all friends...after all we're just trying to help you out ! cut the bullshit and if you want help, you can start by showing some respect !
darkcarnival
07-18-03, 08:12 PM
calm down dude. ok u would be pissed if someone didnt read your question correctly. what the 2 ppl above posted is what i wanted not to have ppl run it. i even said that on the 1st post. it didnt work and i only posted it for a coding check. god take a chill pill its not like i made fun of u. but i go through alot of shit and when i have ppl not understanding me that upsets me! ok every1 has their ticks, yours seems to be ppl givin u lip. gees i got my help and if u dont want to help dont i got others here who do thx.
Maybe you can do a search for my name here and see how many people i helped. And i don't need to chill, it's that it just pisses me off the simple fact that someone is asking for help and gives you attitude...that's all.
...and no i wouldn't be pissed if someone didn't understand my question. I'll just be polite and rephrase it...that's what people who need help do ! Do you see a beggar shouting at people to give him money ?
Damian
Chris Boulton
07-19-03, 07:01 AM
Bleh.. Is it me or is it a *****y day today.. :p
Anyway, darkcarnival.. Use my code as a referrence on how the syntax is done properly.. Dont just copy it and paste.. try to fix your own problems and use mine as a guide ifyours is wrong or as a reference point. (Thats how i learnt alot of my PHP).
darkcarnival
07-19-03, 10:01 AM
ok ill do thx. damian, sorry if ur mad at me but i already resphased it twice and u still thought i wanted it runed.not to agrue but i got the help and im no longer need of this until i get my admin file set-up.thanks to those who helped.
whatever....bla bla bla....checking a code without running it...heh...btw you didn't get helped with your code...you got someone else's code
darkcarnival
07-20-03, 09:57 AM
look im not going to ur level to prove a point so just forget it.
crookyboy
08-05-03, 05:04 AM
i have a search script that searches a file - it can be found here: http://www.cj-design.com/index.php?id=downloads&page=7 it might help you.
Dont listen to him, dont give up with coding alot of it is trial and error and the best way to learn is to pick at other people code. After a while you'll notice that alot of people cant code for s**t - just stick at it!
darkcarnival
08-05-03, 09:12 AM
actully i use your script and i think its gr8 :D i love the stuff u code. cant wait for the poll v2.0 but thx i am amost done with the admin panel but am having problems coding the admin panel so im taking time off of it for a while until i can figure out how to edit and delete and a few other things. my script is kinda like urs but its in mySQL and i have the search in different catagorys to make it like google or yahoo search. but i ur welcome to help me if u want i could give u the admin file and u can help me with that since i got search part done.
btw i didnt let him upset me i already told him it didnt work and it was my 1st program.hopefully i can get it to work.
darkcarnival
08-06-03, 07:35 PM
alright im almost done with my script and once i get help on a few things ill get the admin file here for ppl to check it out and ill be more specific too.and my admin file i can use the most help on :)
vBulletin® v3.6.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.