Create a search engine in Php-Part 1

Hi guys,

i’m here come with some simple tutorial for the begineers in php.In the first part of this tutorial i’m gonna tell about the design view of the search engine.

STEP 1:  first create two files named index.php and search.php

Index.php is the file where we will have our form design view of the search engine.

Search.php is the file where we can provide the results of the searched terms in it.


Lets start with the designing of the form in index.php



<h2>MY Search Engine</h2>

<form method=”get” action=”search.php” >

<input type=”text” name=”search”/>

<input type=”submit” name=”submit”/>




If you followed my previous tutorials you all can know about the methods and actions i used in the form tag. I Used get method here to pass the values in the address bar.

STEP 3: In this step we can get the values from the previous index.php

Use the below code to get the data from index.php


//Get Data


//textbox value


//Checking the submit button is clicked or not


echo ” You didn’t enter any keyword”;


//Check  the keyword for atleast 2 -3 letters


echo ” your String is too short to Search”;


echo “Your Keyword is”. $search;


In the second part of the tutorial we will deal about the database and other stuffs.


Working For Cause Not For Applause

Tagged with: , , ,
Posted in PHP

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: