Mysql search to HTML

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Watch

hoops

Established Member
Impact
0
Hello,

I'm looking for a simple search script that will pull data from my database and display it in an HTML page. I have found several things on the web, but only a few actually worked correct.

Any help would be appreciated.
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
PHP :)

PHP is the answer to your problem

Only thing is one can only write a query if you can show the sample design of the database.

But still to get you started I can write it here.

PHP:
<?php
//Database connection stuff. Assuming it is already connected.
$results = mysql_query("Select * from tablename WHERE columnname LIKE '%KEYWORD%'");
while ( $rows = mysql_fetch_array ( $results ) )
{
$id = $rows['id'];//if any
$title = $row['title'];//title of link or page name etc.
$desc = $rows['desc'];//description or content etc.
$desc = substr($desc, 0, 50);//To only print 50 characters. Can be changed.
echo "<a href='$page.php?$id'>$title</a><br />$desc<br /><hr><br />";
}//while ends
?>
 
0
Close
You could use PHP. You could also use Perl. Or Ruby. Or C#. Just sayin', everyone always jumps to PHP but there *are* others.
 
0
Close
Are you looking for information how to code this yourself or are you looking for a script that does it for you? If you're looking for a script, Webmerge may work for you.
 
0
Close
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back