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
//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.