• zoner.sk
  • SlovakNET.sk
  • inshop.sk
  • interval.cz
  • inmail.sk
  • fotoskola.sk
  • zonerpress.sk
Administration Center | Help | About us
  • Home
  • Domains
  • Webhosting
  • E-commerce
  • Customer support
Search:   |List all help topics|FAQ| česká verze slovenská verzia english version
The Index Of The » Webhosting » Database » Check the MySQL database » To check the version of the MySQL database to check check check and check the Czech 4.1. » Check the source code to check the example to check with check utf-8

The source code of the example with utf-8:


<?php
Echo "<?xml version='1.0' encoding='utf-8'?>";
?>

<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='cs' lang='cs'>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
<meta http-equiv='Content-language' content='cs' />
<meta http-equiv='Cache-control' content='no-cache' />
<meta http-equiv='Pragma' content='no-cache' />
<meta http-equiv='Expires' content='-1' />
<meta http-equiv='imagetoolbar' content='no' />
<meta http-equiv='MSThemeCompatible' content='no' />
<meta name='MSSmartTagsPreventParsing' content='true' />
<title>Test databáze s kódováním UTF-8 a výstupem UTF-8</title>
</head>
<body>
<h1>Test databáze s kódováním UTF-8 a výstupem UTF-8</h1>

<?php $link = MySQL_Connect("adresa_databazoveho_serveru", "nazev_uzivatele", "heslo")
or die("Nelze se připojit"); //připojení k serveru
MySQL_Select_DB("nazev_databaze") or die("Nelze vybrat databazi"); //výběr databáze
MySQL_Query("SET NAMES 'utf8'"); //překóduje DB do utf8
$q="SELECT * FROM cz_test ORDER BY hodnota DESC";
$dotaz=@MySQL_Query($q);
If (@MySQL_Num_Rows($dotaz)>0)
{ //máme v tabulce alespoň jednu hodnotu
Echo "<ul>\n";
While ($vysledek=@MySQL_Fetch_Array($dotaz))
{ //výsledek to pole $výsledek
Echo "<li>".$vysledek['hodnota']."</li>";
};
Echo "</ul>\n";
};
MySQL_Close($link); //ukončení spojení
?>

<p>
<a href="http://validator.w3.org/check?uri=referer">
<img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Strict" height="31" width="88" />
</a>
</p>
</body>
</html>
How satisfied are you with the quality of this help? 0% 25% 50% 75% 100%
Feedback: Send us your views on this page - this will help us improve its quality.

This form is only to improve the quality of help and so please do not expect a response from our technical support. Thank you for your understanding.

Team of customer support
Write one hundred:
  • Home
  • Domains
  • Webhosting
  • E-commerce
  • About us
  • Customer support
  • Partners
  • Administration account
Facebook - ZONER software, a.s.

Webhosting| Domain| Web pages| SSL| CZ domains| EU domains| FREE Website| Gallery

Customer support 24/7 tel.: 603 196 637, 543 257 018|Contact information|Contract conditions|© ZONER software, a.s.