Thank you for any help.
[code=php]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled</title>
</head>
<body>
<?php
/* if the "submit" variable does not exist, the form has not been submitted - display initial page */
if (!isset($_POST['submit']) or trim($_POST['searchstring']) === '' )
{
if(trim($_POST['searchstring'] === ''))
{
include 'error.php';
}
?>
<form name="submitForm" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" />
<input type=text value="" name=searchstring size=25 maxlength=25>
<input type="submit" name="submit" value="Search">
</form>
<?php
}
else
{
include ('search.php');
}
?>
</body>
</html>
[/code]
SEARCH.PHP:
[code=php]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><HTML><HEAD><TITLE></TITLE>
<META content="Evrsoft First Page" name=GENERATOR>
<META content=" " name=description>
<META content=" " name=keywords>
<STYLE type=text/css>FORM.tb {
DISPLAY: inline
}
.h {
FONT-SIZE: 9pt; FONT-FAMILY: Geneva,Arial,sans-serif; TEXT-DECORATION: none
}
.c {
FONT-SIZE: 80%; COLOR: #660099; FONT-FAMILY: Arial,Geneva,sans-serif; TEXT-DECORATION:none
}
.d {
FONT-SIZE: 60%; FONT-FAMILY: Arial,Geneva,sans-serif
}
DT {
MARGIN-TOP: 0.8em; FONT-WEIGHT: bold; FONT-SIZE: 120%
}
.w {
FONT-SIZE: 125%; COLOR: #660099; FONT-FAMILY: Verdana,sans-serif
}
.NSlyr {
VISIBILITY: hidden; WIDTH: 119px; POSITION: absolute
}
</STYLE>
<SCRIPT type=text/javascript>
function go()
{
location=document.forms[0].gowhere.value
}
</SCRIPT>
</HEAD>
<BODY text=black vLink=purple link=blue bgColor=white>
<TABLE cellSpacing=2 cellPadding=1 width="100%" bgColor=#ffcc00 border=0>
<TBODY>
<TR vAlign=top>
<TD width="100%">
<TABLE cellSpacing=2 cellPadding=1 width="100%" border=0>
<TBODY>
<TR>
<TD class=c align=middle width="100%" bgColor=#fff3ac colSpan=3><IMG
height=9 alt="" src="t.gif" width=1> <BR><A href=""><IMG height=84
alt=tutyshop.com isMap
src="file:///C|/Documents and Settings/Owner/My Documents/gladys/shops/ford06_sm.gif"
width=84 border=0></A><B>AUSTRALIA'S LEADING PLACE TO FIND GOOD
DEALS, SAMPLES & FREE OFFERS</B><BR><IMG height=9 alt=""
src="t.gif" width=1></TD></TR>
<TR>
<TD class=c align=middle width="86%" bgColor=#ffcc00> <B>
<a href="http://localhost/textimage99.php"> Home</A> · <a href="http://localhost/computersandelectronics.php">Computers&Electronics</A> · <a href="http://localhost/gamesandtoys.php"> Games&Toys</A> · <a href="http://localhost/giftsandgiftsets.php">Gifts&Gift Sets</A> · <a href="http://localhost/hadwareandtools.php">Hadware&Tools</A> ·
<a href="http://localhost/Healthandbeauty.php">Health&Beauty</A> ·
<a href="http://localhost/more.php">More...</A></B></TD>
<TD align=right width="14%">
<TABLE width="100%" cellSpacing=2 cellPadding=1 border=0>
<TBODY>
<TR>
<TD>
<TD>
<form name="submitForm" action="<searchexample15.php echo $_SERVER['PHP_SELF']; ?>" method="post" />
<input type=text value="" name=searchstring size=15 maxlength=25>
</TD>
<TD align=right
width="1%"><input type="submit" name="submit" value="Search"></FORM></TD>
</TD>
</TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR>
<TABLE cellSpacing=2 cellPadding=1 width="100%" bgColor=#ffcc00 border=1>
<TBODY>
<TR vAlign=top>
<TD width="20%">
<TABLE width="100%"border=1>
<TBODY>
<TR>
<TD class=w align=middle width="20%" >Categories </TD></TR>
<TR>
<TD class=c width"20%"><a href="http://localhost/asseenontv.php"> <b>As seen on TV</b></A> <BR>
<!--
<A href="#">Storage System</A>,<A href="#">Men's Trimmer...</A><BR><A href="#"><B>Batteries</B></A> <A href="#">Clothing</A>,<A
href="#">Luggage</A>,<A href="#">Shoes...</A><BR><BR> -->
<!-- <A href="#">Laptops</A>,<A
href="#">Monitores...</A><A href="#">Printers...</A><BR><BR>
-->
<a href="http://localhost/beddingandmanchester.php"><B>Bedding & Manchester</B></A><BR>
<a href="http://localhost/books.php"><B>Books</B></A><BR>
<!--<A href="#">Digital
Cameras</A>,<A href="#">Phones...</A> <BR><BR>--><a href="http://localhost/candles.php"><B>Candles</B></A> <BR>
<!--<A href="#">Home Furnishing</A>,<A
href="#">Flowers..</A> <BR><BR> --><a href="http://localhost/clockandwatches.php"><b>Clocks & Watches</b></A> <BR><a href="http://localhost/computersandelectronics.php"><B>Computers & Electronics</B></A> <BR>
<a href="http://localhost/fashion.php"><B>Fashion</B></A> <BR>
<a href="http://localhost/frames.php"><B>Frames</B></A><BR><a href="http://localhost/gamesandtoys.php"><B>Games & Toys</B></A><BR> <a href="http://localhost/giftsandgiftsets.php"><b>Gifts & Gift Sets</b></A>
<BR><a href="http://localhost/hadwareandtools.php"><B>Hadware & Tools</B></A> <BR>
<a href="http://localhost/healthandbeauty.php"><B>Health & Beauty</B></A> <BR>
<a href="http://localhost/homeandbaby.php"><B>Home & BaBy</B></A><BR><a href="http://localhost/kitchenware.php"><B>Kitchenware</B></A><BR> <a href="http://localhost/oudoorandcamping.php"><b>Outdoor & Camping</b></A>
<BR><a href="http://localhost/perfume.php"><B>Perfume</B></A> <BR>
<a href="http://localhost/petsupplies.php"><B>Pet Supplies</B></A> <BR>
<a href="http://localhost/sportandfitness.php"><B>Sport & Fitness</B></A><BR><a href="http://localhost/stationaryandart.php"><B>Stationary & Art</B></A><BR>
<a href="http://localhost/supermarket.php"><b>Supermarket</b></A></TD></TR></TBODY></TABLE></TD>
<TD width=9 bgColor=#ffffff><IMG height=1 alt="" src="t.gif" width=19></TD>
<TD width="60%">
<TABLE cellSpacing=2 cellPadding=1 width="100%" border=1>
<TBODY>
<TR>
<TD class=w align=middle bgColor=#ffcc00>TutyShop.com Top 5</TD>
</TR></TBODY></TABLE>
$searchstring="searchstring";
if(!empty($searchstring))
{
$hostname='localhost';
$username='root';
$database='cartonlots';
//establish database connection
$connect = mysql_connect($hostname,$username);
if ($connect==FALSE) {
print 'Unable to connect to database: '.mysql_error();
}
//select database
mysql_select_db($database);
$search = $_POST ['searchstring'];
$result = mysql_query ("SELECT * FROM descriptions
WHERE smdescription LIKE '%$search%'");
while ($row = mysql_fetch_array($result)) {
print '<tr><td>'.$row['image_id'].'</td><td>'.$row['smdescription'].'</td></tr>';
}
?>
<form name="submitForm" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" />
<input type=text value="" name=searchstring size=25 maxlength=25>
<input type="submit" name="submit" value="Search">
</form>
<?php
}
<TD width="20%"> <TABLE border=1 width="100%"> <TBODY><TR><TD class=w align=middle width="20%">ADVERTISE</TD><TR><TD>GFGF</TD></TR></TR></TBODY></TABLE></TD>
</TR></TBODY></TABLE><BR>
<TABLE cellSpacing=2 cellPadding=1 width="100%" bgColor=#ffcc00 border=0>
<TBODY>
<TR>
<TD class=c align=middle width="100%" bgColor=#fff3ac colSpan=3><BR><A
href=""><IMG height=84 alt=tutyshop.com isMap
src="file:///C|/Documents and Settings/Owner/My Documents/gladys/shops/ford06_sm.gif"
width=84 border=0><a href="http://localhost/textimage99.php">Home</A> | <a href="http://localhost/textimage99.php">About
TutyShop.com</A> | <a href="http://localhost/textimage99.php">Side Index</A> |
<a href="http://localhost/textimage99.php">Help</A> | <a href="http://localhost/textimage99.php">Contac Us</A> |
<a href="http://localhost/textimage99.php">Privacy Policy</A><BR><IMG height=9 alt="" src="t.gif"
width=1></TD></TR></TBODY></TABLE></BODY></HTML>
[/code]