Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Great it is working....... :) let me show you code.</p> <p><strong>Step-1 Create database table</strong></p> <pre><code>CREATE TABLE `language_messages` ( `lang_id` int(11) NOT NULL auto_increment, `en` varchar(500) NOT NULL, `ar` varchar(500) NOT NULL, PRIMARY KEY (`lang_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ; INSERT INTO `language_messages` VALUES (1, 'About Us', 'من نحن'); INSERT INTO `language_messages` VALUES (2, 'Contact Us', ' تواصل معنا '); INSERT INTO `language_messages` VALUES (5, '', 'శ్రీనివాస్ తామాడా'); </code></pre> <p><strong>Step-2 create connection</strong></p> <pre><code>$conn=mysql_connect(HOST,DB_USER,DB_PASS) or die(mysql_error()); $db=mysql_select_db(DB_NAME,$conn) or die(mysql_error()); mysql_query("set character_set_server='utf8'"); mysql_query("set names 'utf8'"); </code></pre> <p><strong>Step-3 View output in HTML page</strong></p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;!--&lt;html dir="rtl" lang="ar" xml:lang="ar" xmlns="http://www.w3.org/1999/xhtml"&gt;--&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt; &lt;title&gt;Untitled Document&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;?php $sql = "select * from language_messages"; $res = mysql_query($sql) or die(mysql_error()); while($row = mysql_fetch_array($res)) { echo"&lt;br /&gt;". $row['en']; echo"&lt;br /&gt;". $row['ar']; } ?&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload