JDMPlaya
Senior Member
Alright I'm not a PHP man, but I'm trying to get this little project finished here.
Basically this webpage features a search tool, So people can search through different companies to get there contact information..
as you can see here
I'm trying to make the results that come up Arial 10pt
And when they click on a website under a company in the results page have it so it opens in a new window rather taking it off the existing site.
Here is the PHP code for the file if they would searching by the business name
I'd really appreciate the help!!
Basically this webpage features a search tool, So people can search through different companies to get there contact information..
as you can see here
I'm trying to make the results that come up Arial 10pt
And when they click on a website under a company in the results page have it so it opens in a new window rather taking it off the existing site.
Here is the PHP code for the file if they would searching by the business name
Code:
<?
include("conf.php");
include(DB_INC_FILE);
$search_string_name = stripslashes($search_string_name);
// ////////////////// block of variable to change for different display SORTING methods //////////////
// Next variable is sorting method for display - Change it for different sorting methods
$order_by_field = "last_name";
// Next variable is the file name of this file
$current_file_name = "sel_by_business_type.php";
// ////////////////// end of block of variables to change //////////////////////////////////////////////
$table_name = "greg_chamblin";
$db = @mysql_select_db($db_name, $connection) or die("Couldn't select DCW Equitable database.");
$order_by_field_1 = premium;
$order_by_field_2 = business_name;
$sql = "SELECT business_name, first_name, last_name, address1, address2, city, state, zip, phone, fax, email, web_address, logo
FROM $table_name
WHERE business_name LIKE \"%$search_string_name%\"
ORDER BY $order_by_field_1, $order_by_field_2
";
$result = @mysql_query($sql,$connection) or die("Couldn't execute DCW Equitable Read query.");
while ($row = mysql_fetch_array($result)) {
$business_name = $row['business_name'];
$first_name = $row['first_name'];
$last_name = $row['last_name'];
$address1 = $row['address1'];
$address2 = $row['address2'];
$city = $row['city'];
$state = $row['state'];
$zip = $row['zip'];
$phone = $row['phone'];
$fax = $row['fax'];
$email = $row['email'];
$web_address = $row['web_address'];
$logo = $row['logo'];
$business_type_1 = $row['business_type_1'];
$business_type_2 = $row['business_type_2'];
$business_type_3 = $row['business_type_3'];
if ($logo != "") {$display_block .= "<img src=\"images/$logo\" border=\"0\"><br><br>";}
if ($web_address != "") {
$display_block .= "
<a href=\"http://$web_address\"><strong>$business_name</strong></a><br>";
} else {
$display_block .= "
<strong>$business_name</strong><br>";
}
$display_block .= "
$first_name $last_name<br>
$address1<br>";
if ($address2 != "") {$display_block .= "$address2<br>";}
$display_block .= "
$city, $state $zip<br>
Phone: $phone<br>";
if ($fax != "") {$display_block .= "FAX: $fax<br>";}
if ($email != "") {$display_block .= "<a href=\"mailto:$email\">$email</a><br>";}
if ($web_address != "") {$display_block .= "<a href=\"http://$web_address\">$web_address</a><br>";}
$display_block .= "
<hr align=\"LEFT\" size=\"2\" width=\"100%\" color=\"navy\" noshade><br>
";
}
?>
I'd really appreciate the help!!