This is the script that shows the Hebrew correctly. The mysql_set_charset is placed just after the </html> tag.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Author" content="Leo Earle and Tal Glick">
<meta name="copyright" content="© 2009 GOATS WITH THE WIND">
<meta http-equiv="Content-Language" content="he">
<meta name="keywords" lang="he" content="גבינה, אורגני, עיזים, חווה, מסעדה, יוגורט, לבנה, ריקוטה, חלב, יין, הר השאבי, יודפת, הגליל">
<meta name="robots" content="all">
<meta name="description" lang="he" content="חוות עיזים — המייצרת גבינות מחלב עיזים אורגני טהור ויש בה גם מסעדה נסתרת בין גבעותיו המלטפות של הר השאבי">
<title lang="he" dir="rtl">חלב עם הרוח |
<?php $goatswiththe=$_GET['goatswiththe'];
if ($goatswiththe=="intro") echo "מבוא";
if ($goatswiththe=="cheese") echo "גבינות";
if ($goatswiththe=="restaurant") echo "מסעדה";
if ($goatswiththe=="wine") echo "יין";
if ($goatswiththe=="volunteer") echo "מתנדבים";
if ($goatswiththe=="gallery") echo "גלריה";
if ($goatswiththe=="map") echo "מפה";
if ($goatswiththe=="contactus") echo "יעירת קשר";
?>
</title>
<link rel="stylesheet" type="text/css" href="goatsylesheet.css">
<script type="text/JavaScript">
//<![CDATA[
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
//]]>
</script>
</head>
<body onLoad="MM_preloadImages('pictures/hspinstar.gif')">
<div class="container">
<div class="center">
<div id="goats">
<?php
$goatswiththe=$_GET['goatswiththe'];
if ($goatswiththe=="intro") echo "
<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' name=
'goatanimation' width='884' height='234' id='goatanimation'>
<param name='movie' value='playlogo.swf'>
<object type='application/x-shockwave-flash' data='playlogo.swf' width=
'884' height='234'>
Animation failed to load. Try viewing this site with an alternative
browser or download the latest version of Flash Player.
</object>
</object>";
else echo "
<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' name=
'goatanimation' width='884' height='234' id='goatanimation'>
<param name='movie' value='logo.swf'>
<object type='application/x-shockwave-flash' data='logo.swf' width=
'884' height='234'>
Animation failed to load. Try viewing this site with an alternative
browser or download the latest version of Flash Player.
</object>
</object>";
?>
</div>
<div id="buttons"><ul><li>
<a href="home.php?goatswiththe=intro"><img src="pictures/englishbut.jpg" alt="ENGLISH" id="english" onmouseover=
"MM_swapImage('star1','','pictures/spinstar.gif',1)" onmouseout=
"MM_swapImgRestore()"></a></li>
<li><img src="pictures/star.jpg" alt="*"
id="star1"></li><li><a href="beit.php?goatswiththe=contactus"><img src="pictures/hcontactusbut.jpg"
alt="עירת קשר" id="hcontactus" onmouseover=
"MM_swapImage('star1','','pictures/hspinstar.gif','star2','','pictures/hspinstar.gif',1)"
onmouseout="MM_swapImgRestore()"></a></li><li><img src="pictures/star.jpg" alt=
"*" id="star2"></li><li><a href="beit.php?goatswiththe=map"><img src=
"pictures/hmapbut.jpg" alt="מפה"
id="hmap" onmouseover=
"MM_swapImage('star2','','pictures/hspinstar.gif','star3','','pictures/hspinstar.gif',1)"
onmouseout="MM_swapImgRestore()"></a></li><li><img src="pictures/star.jpg" alt=
"*" id="star3"></li><li><a href="beit.php?goatswiththe=gallery"><img src=
"pictures/hgallerybut.jpg" alt="גלריה"
id="hgallery" onmouseover=
"MM_swapImage('star3','','pictures/hspinstar.gif','star4','','pictures/hspinstar.gif',1)"
onmouseout="MM_swapImgRestore()"></a></li>
<li><img src="pictures/star.jpg" alt=
"*" id="star4"></li><li><a href="beit.php?goatswiththe=volunteer"><img src=
"pictures/hvolunteerbut.jpg" alt="מתנדבים"
id="hvolunteer" onmouseover=
"MM_swapImage('star4','','pictures/hspinstar.gif','star5','','pictures/hspinstar.gif',1)"
onmouseout="MM_swapImgRestore()"></a></li><li><img src="pictures/star.jpg" alt=
"*" id="star5"></li><li><a href="beit.php?goatswiththe=wine"><img src=
"pictures/hwinebut.jpg" alt="יין"
id="hwine" onmouseover=
"MM_swapImage('star5','','pictures/hspinstar.gif','star6','','pictures/hspinstar.gif',1)"
onmouseout="MM_swapImgRestore()"></a></li><li><img src="pictures/star.jpg" alt=
"*" id="star6"></li><li><a href="beit.php?goatswiththe=restaurant"><img src=
"pictures/hrestaurantbut.jpg" alt="מסעדה" id=
"hrestaurant" onmouseover=
"MM_swapImage('star6','','pictures/hspinstar.gif','star7','','pictures/hspinstar.gif',1)"
onmouseout="MM_swapImgRestore()"></a></li>
<li><img src="pictures/star.jpg" alt=
"*" id="star7"></li><li><a href="beit.php?goatswiththe=cheese"><img src=
"pictures/hcheesebut.jpg" alt="יגבינות"
id="hcheese" onmouseover=
"MM_swapImage('star7','','pictures/hspinstar.gif','star8','','pictures/hspinstar.gif',1)"
onmouseout="MM_swapImgRestore()"></a></li><li><img src="pictures/star.jpg" alt=
"*" width="26" height="26" id="star8"></li><li><a href="beit.php?goatswiththe=intro"><img src=
"pictures/hintrobut.jpg" alt="מבוא" id="hintro" onmouseover=
"MM_swapImage('star8','','pictures/hspinstar.gif',1)" onmouseout=
"MM_swapImgRestore()"></a></li>
</ul>
</div>
<div id="hgoattext"><p class='hebrew'><?php
$goatswiththe=$_GET['goatswiththe'];
mysql_connect("MYSQLDB","USER","PASSWORD") or die(mysql_error());
mysql_select_db("goatswi_db") or die(mysql_error());
$result = mysql_query("SELECT * FROM goattext_heb") or die(mysql_error());
$row = mysql_fetch_array( $result );$goattext = $row[$goatswiththe];
function nl2p($goatfunction)
{
$goatfunction = str_replace("\r\n\r\n", "</p><p class='hebrew'>", $goatfunction);
$goatfunction = str_replace("\r\n", "<br>", $goatfunction);
$goatfunction = str_replace("</p><p class='hebrew'>", "</p>\n<p class='hebrew'>", $goatfunction);
$goatfunction = str_replace("\r", '', $goatfunction);
$goatfunction = str_replace("<p class='hebrew'></p>", '', $goatfunction);
return $goatfunction;
}
echo nl2p($goattext);
?></p>
</div>
<div id="hgoatpic">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name=
"pictures" width="546" height="546" id="pictures">
<param name="movie" value="pictures.swf?goatswiththe=<?php echo $_GET["goatswiththe"]; ?>">
<object type="application/x-shockwave-flash" data="pictures.swf?goatswiththe=<?php echo $_GET["goatswiththe"];?>" width=
"546" height="546">
Animation failed to load. Try viewing this site with an alternative
browser or download the latest version of Flash Player.
</object>
</object>
</div>
</div></div>
</body>
</html>
<?php
$link = mysql_connect('MYSQLDB', 'USER', 'PASSWORD') or die(mysql_error());
mysql_set_charset('utf8',$link);
?>
THANK YOU FOR YOUR TIME 🙂
Leao