Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

PHP Search

Name: Anonymous 2007-07-13 3:44 ID:Ak4R4Bn8

In before noob flame, thank you.

I'm like trying to create a PHP search script for my website. So far I have two files: index.php and search.php

form of index.php looks like this:

<div id="search">
   <form method="post" action="search.php">
      <input type="text" name="search">
      <input type="submit" value="Search!">
   </form>
</div>

search.php file looks like this:

<?php
   $search_result = 0;
   $query = " SELECT * FROM items WHERE itemid LIKE '%$search%' ";
   $search_result = mysql_query($query) or die(mysql_error());

   if ($search_result > 0) {
      search_result($search_result);
   }
   else {
      echo " No results to display! ";
   }
?>

What the fuck I am doing wrong?

Name: Anonymous 2007-07-14 8:16 ID:lpvu4hzK

Google uses a 2 line PHP script for their search engine, too.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List