Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 31, 2026.

Search Page

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Watch
OK This tutorial will show you how to make a search page.

Firstly we make a form. I am going to use this:

PHP:
<form method="post" action="searchpage.php">
<p>Please enter keyword.</p>
<p>
<input name="word" type="text" size=25 maxlength=25>
</p>
<p>
<input type="Submit" name="Submit" value="Submit">
</p>
</form>
This is the form where we will enter the keywords. Now the next step is to make the searchpage.php.

It will look like this

PHP:
<?php
// connect to db
$db = mysql_connect("localhostt", "username", "password");
mysql_select_db("dbname",$db);

//check something is sent
if ($_POST['word']) {
$word= $_POST["word"];
// search query
$result = mysql_query("SELECT * FROM `table` WHERE `field` LIKE '%$word%'");
$postword = $_POST['word'];
echo "Search Results for: <strong> $postword </strong> <br />";
echo"<p> </p>";
echo"<p> </p>";
echo"<p> </p>";
echo"<p> </p>";
//get results
while($get=mysql_fetch_array($result))
{


$date = $get['date'];
$name = $get['name'];
$title= $get['title'];

//show results
echo("<strong>$title</strong> was added on <strong>$date</strong> by <strong>$name</strong>");

echo"<p></p>";
echo"<p></p>";
}
// if nothing is sent
}else {
die ("No search word specified");
}

?>
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
CatchedCatched

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover

NamePros updates

Parking: find your domains by pasting a list
You can now paste a list of domain names into the search box at the top of the Parking menu. Put one name on each line. Your domain list...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back