PHP MYSQL- HREF LINK NOT THE SAME IN ALL BROWSERS

Hi Please see code below. When i click on the href link it works fine in Internet explorer but on safari or firefox it does'nt. Can someone help me with this?

Result in IE: file://secretary/EmployeePictures/1Aiden%20Donnelly%202.jpg (correct)
Result in Firefox: http://dove/mustointranet/\\secretary\EmployeePictures\1Aiden Donnelly 2.jpg

Code:

<?php
$db = mysql_connect(localhost, phonebook, d1r3ct66)
	or
die("could not connect");
mysql_select_db("phonebook",$db);

if($searchby == "Last Name") {$var1 = "lastname";}
if($searchby == "First Name") {$var1 = "firstname";}
if($searchby == "Job Title") {$var1 = "jobtitle";}
if($searchby == "Department") {$var1 = "department";}
if($searchby == "Email Address") {$var1 = "email";}
if($searchby == "Office") {$var1 = "office";}
if($searchby == "Office Phone") {$var1 = "phone";}
if($searchby == "Office Phone Ext") {$var1 = "phoneext";}
if($searchby == "Mobile") {$var1 = "mobile";}

if($var2){
$var2temp = "$var2";
}

if($var2temp){
$var2 = "$var2temp%";
}

if(!($var1)){
$var1 = "lastname";
}

$result = mysql_query("SELECT * FROM musto WHERE $var1 LIKE '$var2' ORDER BY lastname ASC",$db); 
echo("<table width='98%' border='0' cellpadding='2'><th>Name</th><th>Job Title</th><th>Dept</th><th>Location</th><th>Phone</th><th>Ext</th><th>Mobile</th><th>Picture</th>");
while ( $row = mysql_fetch_array($result) ) {
echo("<tr>" .
	"<td align='left'><a href=\"mailto:$row[email]\">$row[firstname] $row[lastname]</a></td> <td align='left'>" .
	"$row[jobtitle]</td><td align='left'>$row[department]</td><td align='left'>$row[office]</td><td align='left'> $row[phone]" .
	"</td><td align='left'>$row[phoneext]</td><td align='left'>$row[mobile]</td><td align='left'><a href=\"\\\secretary\EmployeePictures\\1$row[firstname] $row[lastname] 2.jpg\" rel=\"lightbox\" title=\"$row[firstname] $row[lastname] - $row[jobtitle]\">Photo</a></td>" .
	"</tr>\n\n");
}

if ($dofunction == "view"){
$result = mysql_query("SELECT * FROM musto WHERE musto.id = '$id'", $db);
print ("<div align='left'><left><table border='1' cellpadding='0' cellspacing='0' width='80%'><tr><td width='38%' bgcolor='#0099FF'><b>Name:</B> </td>      <td width='30%' bgcolor='#0099FF'><b>Title:</b></td>" .
"<td width='32%' bgcolor='#0099FF'><b>Company:</b></td></tr><tr><td width='38%'>$row[firstame] $row[lastname] </td>" .
"<td width='30%'>$row[jobtitle]</td><td width='32%'>$row[office]</td></tr></table></left></div>");
print ("<div align='left'><left><table border='1' cellpadding='0' cellspacing='0' width='80%'><tr><td width='38%' bgcolor='#0099FF'><b>E-Mail Address:</B> </td><td width='30%' bgcolor='#0099FF'><b>Web Site:</b></td>" .
"<td width='32%' bgcolor='#0099FF'><b>Affiliation:</b></td></tr><tr><td width='38%'><a href='mailto:$row[email]'>$row[email]</a> </td>" .
"<td width='30%'><a href='$row[phoneext]'>$row[department]</a></td><td width='32%'>$row[mobile]</td></tr></table></left></div>");
print ("<div align='left'><left><table border='1' cellpadding='0' cellspacing='0' width='80%'><tr><td width='25%' bgcolor='#0099FF'><b>Home Phone:</B> </td><td width='25%' bgcolor='#0099FF'><b>Work Phone:</b></td>" .
"<td width='25%' bgcolor='#0099FF'><b>Cell Phone:</b></td><td width='25%' bgcolor='#0099FF'><b>Fax Phone:</b></td></tr><tr><td width='25%'>$row[phone] </td>" .
"<td width='25%'>$row[phone]</td><td width='25%'>$row[mobile]</td><td width='25%'>$row[pager]</td></tr></table></left></div>");
print ("<div align='left'><left><table border='1' cellpadding='0' cellspacing='0' width='80%'><tr><td width='50%' bgcolor='#0099FF'><b>Affiliation:</B> </td><td width='50%' bgcolor='#0099FF'><b>Database ID:</b></td>" .
"<tr><td width='50%'>$row[department] </td>" .
"<td width='50%'>$row[id]</td></tr></table></left></div>");
print ("<div align='left'><left><table border='1' cellpadding='0' cellspacing='0' width='80%'><tr><td width='50%' bgcolor='#0099FF'><b>Address:</B> </td><td width='50%' bgcolor='#0099FF'><b>Notes:</b></td>" .
"<tr><td width='50%'></td>" .
"<td width='50%'></td></tr></table></left></div>");
print ("<HR color=#8eb6d2 size=-3><ul><H3>$row[NameF] $row[lastname]</H3>");
print ("<B>Company: $row[office] <p>Title: $row[jobtitle]");

//print ("<p>Affiliation: $row[Affiliation] <p>E-Mail Address: <a href='mailto:$row[Email]'>$row[Email]</a>");
//print ("<p>Address:<br>$addy");
// print ("<P>Notes:<br> $notes");
// print ("<P>Home Phone: $row[Home] <br> Work Phone: $row[Work] ");
// print ("<br>Cell Phone: $row[Cell] <br> Fax No: $row[Fax]<P>");
// print ("Database ID Number: $row[ID]");
// print "</B></ul><HR color=#8eb6d2 size=-3>";
}
?>

Open in new window

aideydAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ziyconCommented:
The reason is due to the way you have the link set, browsers interpret links slightly differently.

Try replacing the back slashes with forward slashes in your link or use the fully qualified url for the link.
0
mcbSolutionsCommented:
If you use local files (\\secretary\......) please add file:// in front of the url. Also use slashes.
0
aideydAuthor Commented:
I've tried adding file and it helps but there is still a difference of 1 backslash between different browsers. Can someone advise further?

Thanks.

Aiden
0
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

ziyconCommented:
Try something like: <a href="file://///secretary/EmployeePictures/1Aiden%20Donnelly%202.jpg">File</a>
0
aideydAuthor Commented:
Tried this and its fine in ie but in firefox its coming up with the 5 backslashes. Its beyond me!
0
ziyconCommented:
In FF you need to open about:config in the address bar, scroll down to security.checkloadurl and set it to false. For security reasons the ability to open local files has been disabled by default.
0
ziyconCommented:
Also the reasons behind it are available at http://kb.mozillazine.org/Links_to_local_pages_don%27t_work
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
aideydAuthor Commented:
Ok Mate. Many thanks for your efforts.

Aiden
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.