Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I put search option in my website??
01-13-2011, 11:22 AM
Post: #1
How can I put search option in my website??
Hey,

I am new in this section, I want to put a search option in my website,i heard about php scripts could help, but is there anyone who has already that script and share with me please...

Cheers

Web Designers Directory | Advertise Web Design Business | Website Design
Find all posts by this user
Quote this message in a reply
02-02-2011, 05:23 PM (This post was last modified: 02-02-2011 05:24 PM by jalicia18.)
Post: #2
RE: How can I put search option in my website??
(01-13-2011 11:22 AM)justinOrel Wrote:  Hey,

I am new in this section, I want to put a search option in my website,i heard about php scripts could help, but is there anyone who has already that script and share with me please...

Cheers

Table: Members
Fields: id | username | password | completename | country
Records:
1 | test | test123 | Testing | Philippines
2 | shin | shin10 | Shin Shin | India

PHP Script - Search
Quote:<?php
/* include your database connection here */
if($_GET[Search]=="Search")
{
$q = $_GET['q'];
$sql = "SELECT * FROM Members WHERE completename LIKE '%$q%' OR username LIKE '%$q%' ";
$result = mysql_query($sql);
$rows = mysql_num_rows($result);
if($rows<=0)
{
echo "No Result(s) Found";
}
else
{
while($found = mysql_fetch_array($result))
{
echo "Username: " . $found[username] . "<br>";
echo "Password: " . $found[password] . "<br>";
echo "FullName: " . $found[completename] . "<br>";
echo "Country: " . $found[country] . "<br>";
echo "<br>";
}
}
}
?>

Search Term: Shin
Quote:Username: shin
Password: shin10
Fullname: Shin Shin
Country: India

Simple Search Form
Quote:<form method="GET" action="">
Enter any keyword<br>
<input type="text" name="q" value=""><br>
<input type="submit" name="Search" value="Search">
</form>

call center philippines | Outbound Call Center | Inbound Call Center
Visit this user's website Find all posts by this user
Quote this message in a reply
05-11-2011, 05:38 PM
Post: #3
RE: How can I put search option in my website??
The code is provided to you, I wanted to know whether it worked well or was there any issue.
Find all posts by this user
Quote this message in a reply
07-24-2011, 06:03 PM
Post: #4
RE: How can I put search option in my website??
i use this link its help me more

Pakistan's Local Search Engine | Yellow Pages of Pakistan
Find all posts by this user
Quote this message in a reply
07-30-2011, 05:41 AM
Post: #5
RE: How can I put search option in my website??
you can write search function in your logic. In php site smarty framework is available for ready made template which will help you put ready made functionality.

Website Design | Website Design Company
Visit this user's website Find all posts by this user
Quote this message in a reply
10-24-2011, 06:24 PM
Post: #6
RE: How can I put search option in my website??
First you have CGI access and that perl is installed. It also installs the script remotely for you if you answer a couple of questions for it (account username and password) which saves you from the installing it yourself.

I've used it for several years and have no issues with it.

Web Hosting Companies in Bangalore | Top Web Design Companies in India | Best Websites Design || Make Any Site
Find all posts by this user
Quote this message in a reply
12-27-2011, 09:23 PM
Post: #7
RE: How can I put search option in my website??
the code provided is quite helpful

website design perth| website design and development perth|website design development perth
Find all posts by this user
Quote this message in a reply
09-06-2012, 10:27 PM
Post: #8
RE: How can I put search option in my website??
thanks for your useful post here good share here

buy iphone 5| iphone sim unlock| unlock iphone 5|
Find all posts by this user
Quote this message in a reply
09-17-2012, 10:11 PM
Post: #9
RE: How can I put search option in my website??
Even the WordPress native search function is inferior to having
the mighty G do your search for you.

Magento Development India
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)