Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 04-11-2005, 07:07 PM Help please
Junior Talker

Posts: 2
Trades: 0
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

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 &nbsp;$last_name<br>
        $address1<br>";

        if ($address2 != "") {$display_block .= "$address2<br>";} 
        $display_block .= "
        $city, $state &nbsp;&nbsp;$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!!
PPloesser is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-11-2005, 09:00 PM
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
Trades: 0
So what trouble are you having? Can you not get the font to work right? Does the script give you an error? Let us know more details of your problem or we have to guess.
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';

Please login or register to view this content. Registration is FREE
(aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Old 04-11-2005, 09:22 PM
Junior Talker

Posts: 2
Trades: 0
I don't know what code to put where to change font/size and also I would like to make it when they click a link in the results to open a new window

Last edited by PPloesser; 04-11-2005 at 09:29 PM..
PPloesser is offline
Reply With Quote
View Public Profile
 
Old 04-12-2005, 06:38 AM
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
Trades: 0
OK where you have this:
HTML Code:
<td valign="top"> <font face="Arial" size="2" color="Black">
(for the td enclosing all your results)
replace it with this:
HTML Code:
<td valign="top" style="font: 10pt Arial; color:black;">
That should sort your font out.
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';

Please login or register to view this content. Registration is FREE
(aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Reply     « Reply to Help please
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.26659 seconds with 12 queries