balkan7 Posted December 7, 2006 Share Posted December 7, 2006 hello all, i have problem whit Macedonian charters, what is wrong whit my code ?i get this: Популарна РРіСЂР° . this is not Macedonian charters.[code]<?require_once("../conn.php");require_once("access.php");require_once("../includes.php");if(isset($_POST[s1])){ $cinfo = $_POST[SelectCategory]; $CategoryID = $cinfo[0]; $cdinfo = $_POST[SelectCd]; $CdID = $cdinfo[0]; $novo = $_POST[novo]; if($_FILES[ItemImage][size] > '0') { $my_image = $t."_".$_FILES[ItemImage][name]; move_uploaded_file($_FILES[ItemImage][tmp_name], "../items_images/$my_image"); } $q1 = "insert into bsoft_catalog set ItemName = '$_POST[ItemName]', ItemCategory = '$CategoryID', ItemCd = '$CdID', ItemDesc = '$_POST[ItemDesc]', ItemPrice = '$_POST[ItemPrice]', ItemImage = '$my_image', Novo = '$novo', Datum = now() "; mysql_query($q1); if(!mysql_error()) { $last = mysql_insert_id(); header("location:view_item.php?ItemID=$last"); exit(); } else { $error = "<br><span class=RedLink>Softwerot veke postoi: \"$_POST[ItemName]\"</span>"; } }require_once("AdminNavigation.php");?><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><br><!-- add item form --><form method=post name=ad1 enctype="multipart/form-data" OnSubmit="return CheckItem();"><table align=center width=400><caption align=center class=Nav>Dodaj Nov Produkt<?=$error?></caption><tr> <td align=right>Ime:</td> <td><input type=text name=ItemName size=40 value="<?=$_POST[ItemName]?>"></td></tr><tr> <td align=right>Kategorija:</td> <td><?=CategorySelect($CategoryID);?></td></tr><tr> <td align=right>CD & DVD:</td> <td><?=CdSelect($CdID);?></td></tr><tr> <td align=right>Novo ?:</td> <td><input type="checkbox" name="novo" value="1" /></td></tr><tr> <td align=right valign=top>Opis:</td> <td><textarea name=ItemDesc rows=6 cols=40><?=$_POST[ItemDesc]?></textarea></td></tr><tr> <td align=right>Image:</td> <td><input type=file name=ItemImage size=30></td></tr><tr> <td align=right>Cena:</td> <td><input type=text name=ItemPrice size=6 value="<?=$_POST[ItemPrice]?>"> Format: 14.95</td></tr><tr> <td></td> <td><input type=submit name=s1 value="Submit"></td></tr></table></form><br><?if(empty($_GET[Start])){ $Start = '0';}else{ $Start = $_GET[Start];}$ByPage = '10';//show the catalog content$q1 = "select ItemID, ItemName from bsoft_catalog order by ItemName limit $Start, $ByPage";$r1 = mysql_query($q1) or die(mysql_error());if(mysql_num_rows($r1) > '0'){ ?> <table align=center width=400 cellspacing=0> <tr class=TableHead> <td width=300>Produkt</td> <td width=100 align=center>Akcija</td> </tr> <? $col = "white"; while($a1 = mysql_fetch_array($r1)) { if($col == "white") { $col = "dddddd"; } else { $col = "white"; } echo "<tr bgcolor=\"$col\">\n\t<td><a href=\"view_item.php?ItemID=$a1[ItemID]\" class=Nav>$a1[ItemName]</a></td>\n<td align=center><a class=GreenLink href=\"edit_item.php?ItemID=$a1[ItemID]\">izmeni</a> | <a href=\"delete_item.php?ItemID=$a1[ItemID]\" class=RedLink OnClick=\"return cdel('$a1[ItemName]');\">brisi</a></td>\n</tr>\n\n"; } echo "</table>"; $qnav = "select count(*) from bsoft_catalog"; $rnav = mysql_query($qnav) or die(mysql_error()); $anav = mysql_fetch_array($rnav); $rows = $anav[0]; if($rows > $ByPage) { $NextPrev = "<br><table align=center width=400><tr>"; $NextPrev .= "<td align=center class=Nav> | "; $pages = ceil($rows/$ByPage); for($i = 0; $i <= ($pages); $i++) { $PageStart = $ByPage*$i; $i2 = $i + 1; if($PageStart == $Start) { $links[] = " <span class=RedLink>$i2</span>\n\t "; } elseif($PageStart < $rows) { $links[] = " <a class=Nav href=\"catalog.php?Start=$PageStart\">$i2</a>\n\t "; } } $links2 = implode(" | ", $links); $NextPrev .= $links2; $NextPrev .= "| </td>"; $NextPrev .= "</tr></table><br>\n"; echo $NextPrev; }}?> [/code] Link to comment https://forums.phpfreaks.com/topic/29833-utf-8-charters/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.