Unstoppable Domains

Mysql search to HTML

Spaceship Spaceship
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
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable DomainsUnstoppable Domains
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
•••
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
•••
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
•••

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Live Options
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back